안철수,박경철의 대화(다소 볼만함)
알찬정보 2010/04/29 11:29http://blogsabo.ahnlab.com/300
Trackback Address :: http://microstrong.pe.kr/tt/trackback/27
Trackback Address :: http://microstrong.pe.kr/tt/trackback/27
Trackback Address :: http://microstrong.pe.kr/tt/trackback/26
Trackback Address :: http://microstrong.pe.kr/tt/trackback/25
Interrupt A Long-Running Query
- 장시간 구동 쿼리 중지
void sqlite3_interrupt(sqlite3*);
This function causes any pending database operation to abort and return at its earliest opportunity.
- 이 함수는 길어지는 database 작업을 중단시켜서 빠른시간안에 다른 작업을 수행할 준비를 할수 있게 해준다.
This routine is typically called in response to a user action such as pressing "Cancel" or Ctrl-C where the user wants a long query operation to halt immediately.
- 이 함수의 역할은 긴 시간이 걸리는 작업에 대해서 "Cancel" 하거나 Ctrl-C 를 통하여 작업 중지 하는 것과 같은 역할을 한다.
It is safe to call this routine from a thread different from the thread that is currently running the database operation.
- 이 함수의 사용은 현재 실행중인 다중 쓰레드의 동시 작업 들에 대해서 안전하다.
But it is not safe to call this routine with a database connection that is closed or might close before sqlite3_interrupt() returns.
- 하지만 sqlite3_interrupt() 가 끝나기 전에 중지된 혹은 중지될 database connection 에 대해서는 안전 하지 않다.
If an SQL operation is very nearly finished at the time when sqlite3_interrupt() is called, then it might not have an opportunity to be interrupted and might continue to completion.
- 만일 sqlite3_interrupt() 가 호출되는 순간 바로 끝나버릴 SQL 작업이있다면 작업의 온전한 중지를 하지 못한다.
An SQL operation that is interrupted will return SQLITE_INTERRUPT.
- 중지된 SQL operation 에 대해서는 SQLITE_INTERRUPT 를 반환한다.
If the interrupted SQL operation is an INSERT, UPDATE, or DELETE that is inside an explicit transaction, then the entire transaction will be rolled back automatically.
- 만일 INSERT,UPDATE,DELETE 명령어 수행중 중지 되었다면 전체 transaction이 자동적으로 Roll back 된다.
A call to sqlite3_interrupt() has no effect on SQL statements that are started after sqlite3_interrupt() returns.
- 시작된후 sqlite3_interrupt() returns 을 받은 SQL 문에 대해서는 sqlite3_interrupt() 함수를 (다시) 호출해도 아무런 영향이 없다.
Invariants:
H12271 The sqlite3_interrupt() interface will force all running SQL statements associated with the same database connection to halt after processing at most one additional row of data.
H12272 Any SQL statement that is interrupted by sqlite3_interrupt() will return SQLITE_INTERRUPT.
Assumptions:
A12279 If the database connection closes while sqlite3_interrupt() is running then bad things will likely happen.
See also lists of Objects, Constants, and Functions.
Trackback Address :: http://microstrong.pe.kr/tt/trackback/24
Page 1
The hamsterdb Tutorial
:hamsterdb 강좌
A Tutorial Book for hamsterdb.
:hamsterdb 강좌 자료.
Copyright © 2007 Christoph Rupp
Created on Friday, March 23, 2007
Last update: Friday, February 08, 2008
This tutorial is a WORK IN PROGRESS. Do not consider it as a finished document.
:이 강좌 자료는 제작중 입니다. 아직 완료 되지 않은 문서임을 고려해 주세요.
Feedback and comments are always welcome. Please send them to contact@hamsterdb.com.
:의견이나 조언은 contact@hamsterdb.com 로 보내주시고 늘 환영합니다.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU
Free Documentation License, Version 1.1 or any later version published by the Free Software
Foundation; with Invariant Sections being „The GNU Free Documentation License“, with no Front-
Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled
„GNU Free Documentation License“.
:복제 나 배포 혹은 문서 수정은 GNU Free Documentation License (Version 1.1) 혹은 자유소프트웨어재단 에 의해
이후 버전의 License 에 의거하여 허용한다. GNU Free Documentation License 의 Invariant 섹션에 의거하여
앞/뒤 표지의 Text 는 유지 해야 한다. 사본의 모든 권리(권한)는 전적으로 'GNU Free Doumentaion License' 에 의거한다.
-------------------------------------------------
Page 2
Table of Contents
Introduction.........................................................................................................................................3
What is hamsterdb?.........................................................................................................................3
Material Covered............................................................................................................................3
Conventions Used in this Tutorial...................................................................................................3
More Documentation on hamsterdb................................................................................................3
Obtaining the Most Recent Versions...............................................................................................3
hamsterdb Licensing.......................................................................................................................4
Getting Started.....................................................................................................................................4
Building for UNIX/POSIX systems................................................................................................4
Building for Microsoft Windows.....................................................................................................4
Porting hamsterdb to Other Platforms.............................................................................................4
Creating a Database.............................................................................................................................5
Creating an In-Memory Database....................................................................................................6
Creating a Record Number Database...............................................................................................6
Opening a Database.............................................................................................................................7
Changing the Default Key Sorting.......................................................................................................7
Inserting Database Items......................................................................................................................8
Deleting Database Items.......................................................................................................................9
Looking up Database Items..................................................................................................................9
Working with Database Cursors.........................................................................................................10
Creating a Database Cursor...........................................................................................................10
Moving Database Cursors..............................................................................................................11
Inserting Database Items with Cursors..........................................................................................12
Looking up Database Items with Cursors......................................................................................12
Overwriting Database Items with Cursors.....................................................................................13
Deleting Database Items with Cursors...........................................................................................13
Cloning a Database Cursor............................................................................................................13
Closing a Database Cursor.............................................................................................................13
Closing a Database............................................................................................................................13
Working with Database Environments...............................................................................................14
Creating a new Environment.........................................................................................................14
Creating In-Memory Environments..........................................................................................15
Opening an Environment...............................................................................................................15
Creating a Database in an Environment........................................................................................16
Opening a Database in an Environment........................................................................................16
Renaming a Database in an Environment......................................................................................16
Removing a Database from an Environment.................................................................................17
Closing an Environment................................................................................................................17
Working with Duplicate Keys............................................................................................................17
Enabling Duplicate Keys...............................................................................................................17
Inserting Duplicate Keys...............................................................................................................17
Traversing Duplicate Keys............................................................................................................18
Replacing Duplicate Keys.............................................................................................................18
Get the Number of Duplicate Keys................................................................................................18
Deleting Duplicate Keys................................................................................................................19
The C++ API.....................................................................................................................................19
Appendix I: The GNU General Public License 2.0............................................................................20
Appendix II: The GNU General Public License 3.0..........................................................................24
Appendix III: The GNU Free Documentation License......................................................................35
Trackback Address :: http://microstrong.pe.kr/tt/trackback/23

Trackback Address :: http://microstrong.pe.kr/tt/trackback/22
FreeTDS is a set of libraries for Unix and Linux that allows your programs to natively talk to Microsoft SQL Server and Sybase databases.
FreeTDS 는 Unix 와 Linux 에서의 프로그램을 MS SQL 이나 Sybase data 베이스와 통신하기 위한 library다
Technically speaking, FreeTDS is an open source implementation of the TDS (Tabular Data Stream) protocol used by these databases for their own clients.
It supports many different flavors of the protocol and three APIs to access it.
Additionally FreeTDS works with other software such as Perl and PHP, providing access from those languages as well.
기술적으로 말하면 FreeTDS 는 MS SQL 혹은 Sybase Client 가 사용하는 TDS(Tabular Data Stream) protocol 을 사용하는 도구다.
FreeTDS 는 세가지 API 를 제공함으로서 많은 장점을 제공한다.
더불어 FreeTDS 는 Perl 과 PHP 같은 다른 Software 와도 잘 동작 한다.
If you are looking for a Java implementation, we refer you to the jTDS project on SourceForge.
혹시 Java 와 관련된 내용을 알고 싶다면 SourceForge 에 jTDS project 를 참고하길 권한다.
--이부분 번역 다시 해볼것.
FreeTDS has many possible uses.
It has been used by Unix/Linux webservers to present data stored in SQL Server to the web,
to port SQL Server database code from NT to Unix, to import data into SQL Server from a Unix source,
and to provide database access on platforms (such as realtime systems) that have no native drivers.
FreeTDS 는 많은 것들을 가능하게 해준다.
SQL Server에 저장되어 있는 데이터를 웹으로 보여주기도 하고 SQL Server code 를 NY에서 Unix로 전달하기도 한다.
또 Unix 로 부터 Sql Server 로 가져오기도 하고 본래 내장된 드라이버가 없는 시스템에서도 접근이 가능하도록 한다.
The FreeTDS C libraries are available under the terms of the GNU LGPL license, consult the COPYING.LIB file in the distribution for details.
FreeTDS C 라이브러리는 GNU LGPL 라이센스를 준수하며 자세한 내용은 배포된 COPYING.LIB 를 참고하시기 바란다.
Trackback Address :: http://microstrong.pe.kr/tt/trackback/21
Trackback Address :: http://microstrong.pe.kr/tt/trackback/20
Each Unix system has a directory /tmp which acts as a "scratch area" which you can use to hold files and directories for short periods of time. For example:
mkdir /tmp/for_u_tim cp -r surprise /tmp/for_u_tim
This creates the directory for_u_tim in the directory /tmp and then copies the directory surprise to it.
User tim might have been told that there is "something" for them in /tmp.
The access permissions and the group ownership must be set correctly before another user can copy the directory or link to it.
Remember to remove files and directories that you copy to or create in the directory /tmp; other people need that space too.
Do not use the /tmp directory to store vital information; it is cleared whenever the system is "booted up" and by the system administrator when the directory gets full.
Trackback Address :: http://microstrong.pe.kr/tt/trackback/19
itoa 함수를 사용하려는데 stdlib.h 를 include 했지만 함수가 없다고 한다.
무심코 검색했더니 나오는 코드 ... 그냥 이걸 가져다 썻다.
//////////////////////////////////////////////
int * ltoa (long val, char *buf, unsigned radix)
{
char *p; /* pointer to traverse string */
char *firstdig; /* pointer to first digit */
char temp; /* temp char */
unsigned digval; /* value of digit */
p = buf;
if (radix == 10 && val < 0) {
/* negative, so output '-' and negate */
*p++ = '-';
val = (unsigned long)(-(long)val);
}
firstdig = p; /* save pointer to first digit */
do {
digval = (unsigned) (val % radix);
val /= radix; /* get next digit */
/* convert to ascii and store */
if (digval > 9)
*p++ = (char) (digval - 10 + 'a'); /* a letter */
else
*p++ = (char) (digval + '0'); /* a digit */
} while (val > 0);
/* We now have the digit of the number in the buffer, but in reverse
order. Thus we reverse them now. */
*p-- = '\\0'; /* terminate string; p points to last digit */
do {
temp = *p;
*p = *firstdig;
*firstdig = temp; /* swap *p and *firstdig */
--p;
++firstdig; /* advance to next two digits */
} while (firstdig < p); /* repeat until halfway */
return 1;
}
/////////////////////////////////////////////////
출처는 http://cpueblo.com 유광희 님의 홈피. 감사... ^^
Trackback Address :: http://microstrong.pe.kr/tt/trackback/18