--
-- ********************************************************************
-- Creating a trigger for timeEnter
-- Run as follows:
-- $ sqlite3 test.db < trigger1
-- ********************************************************************
CREATE TRIGGER insert_t1_timeEnter AFTER INSERT ON t1
BEGIN
UPDATE t1 SET timeEnter = DATETIME('NOW') WHERE rowid = new.rowid;
END;
-- ********************************************************************
Sunday, February 6, 2011
Sunday, January 30, 2011
sqlite dump
copied from http://stackoverflow.com/questions/75675/how-do-i-dump-the-data-of-some-sqlite3-tables
You don't say what you wish to do with the dumped file.
I would use the following to get a CSV file, which I can import into almost everything
.mode csv
.header on
.out file.dmp
select * from emp;
If you want to reinsert into a different SQLite database then:
.mode insert
.out file.sql
select * from em
compile sqlite3 to be a shared library
gcc -c -fPIC sqlite3.c
# gcc -shared -o libsqlite3.so -fPIC sqlite3.o
gcc -shared -o libsqlite3.so -fPIC sqlite3.o -ldl -lpthread
Wednesday, January 12, 2011
cd 2 iso on mac
mac, cd to iso
hdiutil makehybrid -iso -joliet -o Master.is XXXX
XXXX is the folder that might show on the desktop
hdiutil makehybrid -iso -joliet -o Master.is XXXX
XXXX is the folder that might show on the desktop
pdfcrop2 absolute mode
using pdfcrop2 under absolute mode,
you can crop from any rectangular area from a pdf file: paper size - margins
Tuesday, December 28, 2010
beamer bullets for table of contents
%\setbeamertemplate{sections/subsections in toc}[ball]
\setbeamertemplate{subsection in toc}[ball]
%ref: beamer class user guide
\setbeamertemplate{subsection in toc}[ball]
%ref: beamer class user guide
beamer is not good in the sense that it took me quite a long to figure
out how to put some bullets in the table of contents.
beamer installation place on ubuntu
/usr/share/texmf/tex/latex/beamer
it might be help when we need to know where beamer and other classes
files are located.
and use
texhash
mktexlsr
to remake the indices for texlive
Subscribe to:
Posts (Atom)