Changes between Version 7 and Version 8 of jazz/09-09-11


Ignore:
Timestamp:
Sep 12, 2009, 12:56:02 AM (15 years ago)
Author:
jazz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • jazz/09-09-11

    v7 v8  
    5353Any source-code tarball that includes the 'debian/*' files should be able to be built directly with it.
    5454}}}
     55 * 中文叢書
     56  * [http://tlsj.tenlong.com.tw/WebModule/BookSearch/bookSearchViewAction.do?isbn=9789866840302&sid=48113&aid=69e42ffb   Python 學習手冊 (Learning Python, 3/e)]
     57  * [http://www.books.com.tw/exep/prod/booksfile.php?item=0010434463& Python 3 技術手冊]
    5558 
    5659== Message Queue ==
     
    7477}}}
    7578
     79== SQLite ==
     80
     81 * [http://mailliststock.wordpress.com/2007/03/01/sqlite-examples-with-bash-perl-and-python/ SQLite examples with Bash, Perl and Python]
     82{{{
     83#!perl
     84#!/usr/bin/perl -w
     85use DBI;
     86use strict;
     87my $db = DBI->connect("dbi:SQLite:test.db", "", "",
     88{RaiseError => 1, AutoCommit => 1});
     89
     90$db->do("CREATE TABLE n (id INTEGER PRIMARY KEY, f TEXT, l TEXT)");
     91$db->do("INSERT INTO n VALUES (NULL, 'john', 'smith')");
     92my $all = $db->selectall_arrayref("SELECT * FROM n");
     93
     94foreach my $row (@$all) {
     95my ($id, $first, $last) = @$row;
     96print "$id|$first|$lastn";
     97}
     98}}}
     99{{{
     100#!python
     101#!/usr/bin/python
     102from pysqlite2 import dbapi2 as sqlite
     103
     104db = sqlite.connect('test.db')
     105cur = db.cursor()
     106cur.execute('CREATE TABLE n (id INTEGER PRIMARY KEY, f TEXT, l TEXT)')
     107db.commit()
     108cur.execute('INSERT INTO n (id, f, l) VALUES(NULL, "john", "smith")')
     109db.commit()
     110cur.execute('SELECT * FROM n')
     111print cur.fetchall()
     112}}}
     113{{{
     114#!sh
     115#!/bin/bash
     116sqlite3 test.db  "create table n (id INTEGER PRIMARY KEY,f TEXT,l TEXT);"
     117sqlite3 test.db  "insert into n (f,l) values ('john','smith');"
     118sqlite3 test.db  "select * from n";
     119}}}
     120
    76121== Torque ==
    77122