2012年12月27日 星期四

SQLite C Interface

Result Codes

#define SQLITE_OK           0   /* Successful result */

/* beginning-of-error-codes */

#define SQLITE_ERROR        1   /* SQL error or missing database */

#define SQLITE_INTERNAL     2   /* Internal logic error in SQLite */

#define SQLITE_PERM         3   /* Access permission denied */

#define SQLITE_ABORT        4   /* Callback routine requested an abort */

#define SQLITE_BUSY         5   /* The database file is locked */

#define SQLITE_LOCKED       6   /* A table in the database is locked */

#define SQLITE_NOMEM        7   /* A malloc() failed */

#define SQLITE_READONLY     8   /* Attempt to write a readonly database */

#define SQLITE_INTERRUPT    9   /* Operation terminated by sqlite3_interrupt()*/

#define SQLITE_IOERR       10   /* Some kind of disk I/O error occurred */

#define SQLITE_CORRUPT     11   /* The database disk image is malformed */

#define SQLITE_NOTFOUND    12   /* Unknown opcode in sqlite3_file_control() */

#define SQLITE_FULL        13   /* Insertion failed because database is full */

#define SQLITE_CANTOPEN    14   /* Unable to open the database file */

#define SQLITE_PROTOCOL    15   /* Database lock protocol error */

#define SQLITE_EMPTY       16   /* Database is empty */

#define SQLITE_SCHEMA      17   /* The database schema changed */

#define SQLITE_TOOBIG      18   /* String or BLOB exceeds size limit */

#define SQLITE_CONSTRAINT  19   /* Abort due to constraint violation */

#define SQLITE_MISMATCH    20   /* Data type mismatch */

#define SQLITE_MISUSE      21   /* Library used incorrectly */

#define SQLITE_NOLFS       22   /* Uses OS features not supported on host */

#define SQLITE_AUTH        23   /* Authorization denied */

#define SQLITE_FORMAT      24   /* Auxiliary database format error */

#define SQLITE_RANGE       25   /* 2nd parameter to sqlite3_bind out of range */

#define SQLITE_NOTADB      26   /* File opened that is not a database file */

#define SQLITE_ROW         100  /* sqlite3_step() has another row ready */

#define SQLITE_DONE        101  /* sqlite3_step() has finished executing */

/* end-of-error-codes */

 

2012年11月26日 星期一

cannot restore segment prot after reloc: Permission denied

By default, CentOS 5 has the SE Linux feature set to enforcing. So, sometimes when you install CUBRID on CentOS and try to start the cubrid services cubrid service start, you may encounter the following error:
[cubrid@localhost ~]$ cubrid service start
cubrid: error while loading shared libraries: /opt/cubrid/lib/libcubridsa.so.8: cannot restore segment prot after reloc: Permission denied


To temporarily disable enforcement on a running system, type
/usr/sbin/setenforce 0

To permanently disable enforcement during a system startup
change "enforcing" to "disabled" in ''/etc/selinux/config'' and reboot.

2012年11月19日 星期一

Problem installing zmq on amazon linux (unable to find uuid)

checking for uuid_generate in -luuid... no

configure: error: cannot link with -luuid, install uuid-dev.

 

 

Then, I created a link as below:

sudo ln -s /lib64/libuuid.so.1.3.0 /lib64/libuuid.so

 

2012年11月13日 星期二

ASCII Printable Characters

ASCII Character

HTML Entity Code

Description

 

space

!

!

exclamation mark

"

"

quotation mark

#

#

number sign

$

$

dollar sign

%

%

percent sign

&

&

ampersand

'

'

apostrophe

(

(

left parenthesis

)

)

right parenthesis

*

*

asterisk

+

+

plus sign

,

,

comma

-

-

hyphen

.

.

period

/

/

slash

0

0

digit 0

1

1

digit 1

2

2

digit 2

3

3

digit 3

4

4

digit 4

5

5

digit 5

6

6

digit 6

7

7

digit 7

8

8

digit 8

9

9

digit 9

:

:

colon

;

&#59;

semicolon

< 

&#60;

less-than

=

&#61;

equals-to

> 

&#62;

greater-than

?

&#63;

question mark

@

&#64;

at sign

A

&#65;

uppercase A

B

&#66;

uppercase B

C

&#67;

uppercase C

D

&#68;

uppercase D

E

&#69;

uppercase E

F

&#70;

uppercase F

G

&#71;

uppercase G

H

&#72;

uppercase H

I

&#73;

uppercase I

J

&#74;

uppercase J

K

&#75;

uppercase K

L

&#76;

uppercase L

M

&#77;

uppercase M

N

&#78;

uppercase N

O

&#79;

uppercase O

P

&#80;

uppercase P

Q

&#81;

uppercase Q

R

&#82;

uppercase R

S

&#83;

uppercase S

T

&#84;

uppercase T

U

&#85;

uppercase U

V

&#86;

uppercase V

W

&#87;

uppercase W

X

&#88;

uppercase X

Y

&#89;

uppercase Y

Z

&#90;

uppercase Z

[

&#91;

left square bracket

\

&#92;

backslash

]

&#93;

right square bracket

^

&#94;

caret

_

&#95;

underscore

`

&#96;

grave accent

a

&#97;

lowercase a

b

&#98;

lowercase b

c

&#99;

lowercase c

d

&#100;

lowercase d

e

&#101;

lowercase e

f

&#102;

lowercase f

g

&#103;

lowercase g

h

&#104;

lowercase h

i

&#105;

lowercase i

j

&#106;

lowercase j

k

&#107;

lowercase k

l

&#108;

lowercase l

m

&#109;

lowercase m

n

&#110;

lowercase n

o

&#111;

lowercase o

p

&#112;

lowercase p

q

&#113;

lowercase q

r

&#114;

lowercase r

s

&#115;

lowercase s

t

&#116;

lowercase t

u

&#117;

lowercase u

v

&#118;

lowercase v

w

&#119;

lowercase w

x

&#120;

lowercase x

y

&#121;

lowercase y

z

&#122;

lowercase z

{

&#123;

left curly brace

|

&#124;

vertical bar

}

&#125;

right curly brace

~

&#126;

tilde