Robert Holland

May 232014
 

Fedora 17 – Install Scanner

Fedora’s live KDE disk does not ship with any scanning software.  There are two very useful programs that I use for scanning, depending on what I am scanning.

Xsane
The most flexible scanning software available.  Xsane gives you fine grain control over scanning.  One very handy feature is the ability to batch scan multiple areas of your scanner, which is great for scanning photos using time-consuming high resolution settings.

Simple-scan
Just as the name indicates.  A very simple scanner.  Place document, hit scan, and go.  The one very nice feature of simple-scan is the ability to batch scan several sheets into a single PDF file, provided you have the hardware to do so.  Many multifunction printers have an automatic document feeder feature

Sane

Before any scanning software can be used, the backend that controls the scanner must be installed.  Sane, an acronym for Scanner Access Now Easy, is just that.  Install it, and go.  Any sane compatible scanner will work.  I’ve had success with HP MFC printers, and I have a Canon scanner.  Both work with no issues, including the wireless HP MFC printer!

As root,


yum -y install sane-backends-drivers-scanners
sane-find-scanner


You may find it necessary to unplug and re-plug in the USB cable to your scanner before trying one of the below scanning programs.

Xsane

As root, with your USB scanner attached and powered up


yum -y install xsane


Simple Scan

As root,


yum -y install simple-scan


Source
 

May 082014
 

Enum is a good choice for boolean type of fields except that it is treated as a string and not an integer. In this case I just want to set a column in the table to indicate whether the row is active (1) or not (0). I do not want someone to accidentally enter a 2, 3, etc. in the field.

alter table healthtemperature1 add column active_ind enum('0','1') not null;

Article on Enum
May 072014
 
/*
drop database lastinsert_id;
create database lastinsert_id;
use lastinsert_id;
create table foo (id int(11) auto_increment primary key
, text varchar(50) not null)engine=myisam;

create table foo2 (id int(11) auto_increment primary key
, foo_id int(11) not null, text varchar(50) not null)engine=myisam;
*/

INSERT INTO foo (id,text)
    VALUES(NULL,'filename');         # generate ID by inserting NULL
INSERT INTO foo2 (id,foo_id,text)
    VALUES(NULL,LAST_INSERT_ID(),'last_insert_id.sql');  # use ID in second table

Source