Command Line Syntax (Desktop):

qamiden [database_file.qdb]

Optionally specify a qdb file on first use, or to override a database “remembered” from the previous session.

QamIDEN is a front end to monolingual or bilingual SQLite databases custom-built by third parties for version 2+ of this application (the v1 database still works, but is converted internally to v2 format on first use, which takes about 30 seconds on a dual-core 1.5GHz phone — the native v2 qamiden.qdb database has identical data but half the size, and is preferable). Search the Internet (http://www.google.co.id/search?num=100&q=qamiden+qdb) for compatible databases (several v2 databases are downloadable here; a v1 database from 2011 is available at Sourceforge, 7.2Mb).

QamIDEN was originally (version 1) designed for dictionaries (hence the terminology “headword”, “definition”, “language”, “translation”, etc), although a QamIDEN v2 database may consist of any kind of paired data, e.g. names and addresses. Unpaired data, with a single significant column, also works.

Installing Dictionaries and Fonts on Android Devices (Smartphones and Tablets): QamIDEN stores dictionaries and QamIDEN’s INItialization/Settings file on the internal SDcard. All data is stored in folder /sdcard/qamiden/. Tether your phone via USB to a host computer and use adb[.exe] (Android Debug Bridge) to copy dictionaries from the host to the phone, e.g.:
adb push [path]dictname.qdb /sdcard/qamiden/dictname.qdb

Try to download adb separately from the Android SDK (the SDK is >100Mb, but it’s adb component is <1Mb). You’ll also need USB drivers specific to your phone (obtain from the manufacturer’s website).
Alternatively, download dictionaries direct to your phone, and move them into /sdcard/qamiden/, or specify them in QamIDEN’s “Open Database” dialog, e.g.:

/sdcard/download/dictname.qdb

Rooted users may additionally push TTF fonts to the phone’s font folder /system/fonts/ (remount this folder in Read/Write mode, with su [“SuperUser” i.e. root user] elevated privileges) — be sure to push all font styles (normal, bold, etc.), e.g.:

adb -d push [path]myfont.ttf /sdcard/myfont.ttf
adb -d shell
$ su -c '/system/bin/bash'
# mount -o remount,rw /dev/null /system
# cp /sdcard/myfont.ttf /system/fonts/myfont.ttf
# rm /sdcard/myfont.ttf

QamIDEN dictionaries are able to request a particular font, in preference to the default Droid Sans font (cf. “HowTo” → “Database Structure”); a database author may specify that font in a note accompanying the dictionary, or the font may be bundled with the dictionary.

Overview:
  monolingual:
Lang1_Headword → Lang1_Definition
  or
Lang1_Definition

  bilingual:
Lang1_Headword → Lang2_Definition
  and/or
Lang2_Headword → Lang1_Definition

Translation Direction: (bilingual databases only) select
Language_1 → Language_2
  or
Language_2 → Language_1

Auto: (bilingual databases only) if no result returned by the current translation direction, automatically Search in the opposite direction (default=not checked)

    Search option schema:
search term → result [option]

“word” → “word” [no options checked]
“word” → “word, by word of mouth, catch word” etc. [Headwords checked ✓]
“word” → “word, (Islam) divine words, whatsit (particle used to avoid saying actual word)” etc. [Definitions]
“word” → “word, forword, swordfish” etc. [Substrings; also requires Headwords and/or Definitions]

In bilingual dictionaries, the “Definitions” option inquires within the definitions of the opposite translation direction, and returns the headword(s). In monolingual dictionaries, it usually makes sense (and is often imperative) to enable Search within Definitions.

Search terms may be multiple words, separated by spaces.
    Search options may be omitted or combined. The initial default search options are Headwords, Substrings.
    Search terms are case-insensitive by default (but see Keyboard Shortcuts, below). In general, use lower case only.
    To perform a database Search for a word or string that appears in the Search (or Query) results, click on the word or select a string of characters, then command Alt+S [Cmd+S on Apple hardware].

Find: locate text within the Search results.

Reveal SQL ✓: append to the Results the underlying SQL queries executed by QamIDEN.

Context Rows: display a number of lines (rows of data, max=500) following (positive number) or preceding (negative number) each result returned by your Search. Normally not needed (default=0). Useful with certain “monolingual” dictionaries or text documents, e.g the thematic organization of the original Roget thesaurus, in which headwords are grouped conceptually rather than alphabetically; you can “browse” related data.
    You may fetch subsequent or previous rows, e.g. "5" rows or "-1" row; returned rows are marked current, ˇ subsequent, and ˆ previous.

SQL Query ✓: construct a Query (instead of a Search). This is a dangerous option, for SQL experts only.

Make a backup copy of the dictionary (*.qdb) before you execute Update, Insert, or other potentially destructive SQL commands.

Valid queries are executed without regard to consequences, which are permanent.
Keyboard Shortcuts (see below) are the same as Search.

Example (non-destructive) SQL queries:

SELECT name FROM sqlite_master WHERE type='table' ORDER BY name //List all tables in qdb
SELECT * FROM sqlite_master //Return i.a. the CREATE command for table dictdata
SELECT L2h,L1d FROM dictdata WHERE L2h LIKE '%.' //Return translation of all abbreviations
SELECT L1h,L2d FROM dictdata WHERE L1h LIKE 'L1h%' //The default query of original QamIDEN v1.0
SELECT L1d FROM dictdata WHERE L1d LIKE '%Bluebird%' AND L1d LIKE '%taxi%' //Return (with luck) Jakarta taxi phone numbers
SELECT L1h,L1d FROM dictdata //Return all data in a monolingual database (=Alt+Shift+A)

Example (destructive) queries:

UPDATE dictdata SET L2h='dishtowel' WHERE L2h='distowel' //Correct spelling
UPDATE dictdata SET L2d=REPLACE(L2d,'kenyataan','fact') //Correct database errors

Search, Find, and SQL Query Input Boxes retain separate histories of executed queries (max=100 for each input type, FIFO), for each qdb database that you open. QamIDEN remembers between sessions your current database name, choice of translation direction if applicable, selected options, and Search|Find|Query histories.
    Arrow Up or Arrow Down to scroll a history (Volume Up|Down on Smartphones).
    F5 deletes the currently-displayed string from a history.

Open Database/Db:<database_name> tab allows you to select a new or different current working database (*.qdb) file. You may also Exit QamIDEN from this tab.

Diacritics are encoded as HTML entities. For example, “ü” is encoded as “&uuml;” and therefore cannot be sought literally. For “tête-à-tête”, search for “t%te-%-t%te” (“%” is the SQL wildcard); alternatively, substring “te-” will return tête-à-tête among its results.

Special considerations for very large databases (>100Mb): Large databases will respond slowly unless they can be cached entirely within available RAM. It is imperative that all checkboxes (Headwords/Definitions) be cleared before launching a Search! The more memory available, the faster QamIDEN performs.

Touch Screen Gestures:
Scroll text results with a two-finger swipe up or down within the text result box. If you slide two fingers into the green areas at screen top|bottom, the screen scrolls continuously, accelerating as your fingers move higher or lower, or stopping when two fingers re-enter the Results text area. (Page Up|Down [Volume Up|Down] and the vertical slider also scroll text results.)
Select text to Search by pressing the screen (one-finger tap and hold) until the background turns gray, then select some text (one finger). The single word at the beginning of the selection is sought, therefore your selection does not need to be precise, can straddle more than one word, can begin in the middle of the sought word or contain just a few characters within it. If you make the wrong selection, simply re-select. Then click a Search button. The opportunity to Select (gray background) times out after 10 seconds.


    Keyboard Shortcuts (YMMV with software keyboards on smartphones etc!)

Tab: cycle through Search Results → Search input → Find input → Search Results ...
Alt+1, Alt+2: pick the “translation direction” (bilingual databases only)
Alt+A: toggle Auto checkbox (bilingual databases only)
Alt+H: toggle Headwords
Alt+D: toggle Definitions
Alt+U: toggle Substrings
Alt+R: toggle Reveal SQL
Alt+Q: toggle SQL Query
Alt+N: select Font family and/or size
Enter: execute Search|Query|Find
Alt+S: execute Search|Query
Alt+F: execute Find
Alt+Ctrl+S|F: execute Search|Find case-sensitively (useful within Definitions)
Alt+Shift+F: execute Find backward
Alt+Shift+Ctrl+F: execute Find backward, case-sensitively
Alt+Shift+A: display All data in the database. Large databases may take time to display
Arrow Up, Arrow Down: scroll a history
F5: delete currently-displayed string from a history
Ctrl+C: Copy selected text in Search Results to system Clipboard
Ctrl+L: Copy all text in Search Results to system Clipboard
Ctrl+O: Open a database
Ctrl+H: Help
Ctrl+I: Information about QamIDEN
Ctrl+X | Alt+F4: Exit


    Smartphone/Tablet Buttons
VolumeUp/VolumeDown: PageUp|PageDown in results, or scroll histories if text cursor is located in a Search, Find, or Query input box
Menu [Info]: Open new database (*.qdb) file
Search: execute Search|Find. If no results are currently displayed, display software keyboard to enter Search text. If text is Selected within the results, Search for the first Selected alphabetic word.
Done/Next: execute Search|Find
Back: if text cursor is located in a Search, Find, or Query input box, delete the currently-displayed string from history (if a soft keyboard is displayed, tap Back twice). Otherwise Exit QamIDEN

Smartphone Issues:
A few dictionaries will not display in Droid Sans, the default font (all characters appear as boxes: ◻). Solution: switch to Droid Serif (QamIDEN remembers the font choice for each dictionary)

Notes:
Illegal or nonsensical operations are disabled throughout. Context Rows, for example, does not operate within the random “Definitions” of bilingual dictionaries, which are inherently disordered.

Texts accessed via the green Menu tabs at top (e.g. this “How To”) are canceled by launching a Search in the current database.

For more information, or to create your own databases, click “HowTo” → “Database Structure”, above.

For specifics of SQLite databases, consult http://www.sqlite.org/