Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 73: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 74: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 75: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 76: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 77: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 78: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
package com.achie.gs1; public class SampleDatabase { private static final String DATABASE_NAME = "zoodatabase.db"; private static final String ANIMALS_TABLE = "animals"; private static final int DATABASE_VERSION = 2; private final ZooOpenHelper mDatabaseOpenHelper; private static final HashMap mColumnMap = buildColumnMap(); public static final String ANIMAL_NAME = "name"; public SampleDatabase(Context context) { mDatabaseOpenHelper = new ZooOpenHelper(context); } private static HashMap buildColumnMap() { HashMap map = new HashMap(); map.put(ANIMAL_NAME, ANIMAL_NAME); map.put(BaseColumns._ID, "rowid AS "+BaseColumns._ID); map.put(SearchManager.SUGGEST_COLUMN_INTENT_DATA_ID, "rowid AS "+SearchManager.SUGGEST_COLUMN_INTENT_DATA_ID); map.put(SearchManager.SUGGEST_COLUMN_SHORTCUT_ID, "rowid AS "+SearchManager.SUGGEST_COLUMN_SHORTCUT_ID); return map; } public Cursor getAnimal(String rowId, String[] columns) { String selection = "rowid = ?"; String[] selectionArgs = new String[] {rowId}; return query(selection, selectionArgs, columns); } public Cursor getAnimalMatches(String query, String[] columns) { String selection = ANIMAL_NAME + " LIKE ?"; String[] selectionArgs = new String[] {"%"+query+"%"}; return query(selection, selectionArgs, columns); } private Cursor query(String selection, String[] selectionArgs, String[] columns) { SQLiteQueryBuilder qb = new SQLiteQueryBuilder(); qb.setTables(ANIMALS_TABLE); qb.setProjectionMap(mColumnMap); Cursor cursor = qb.query(mDatabaseOpenHelper.getReadableDatabase(), columns, selection, selectionArgs, null, null, null); if(cursor == null) { return null; } else if (!cursor.moveToFirst()) { cursor.close(); return null; } return cursor; } private static class ZooOpenHelper extends SQLiteOpenHelper { private SQLiteDatabase mDatabase; private static final String CREATE_ANIMALS_TABLE = "CREATE TABLE "+ANIMALS_TABLE+ " (_id integer primary key autoincrement, "+ANIMAL_NAME+" text not null);"; private static final String[] ANIMALS = new String[] {"Lion", "Tiger", "Elephant", "Deer", "Kangaroo"}; public ZooOpenHelper(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); } public void onCreate(SQLiteDatabase db) { mDatabase = db; mDatabase.execSQL(CREATE_ANIMALS_TABLE); loadDatabase(); } public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {} private void loadDatabase() { new Thread(new Runnable() { @Override public void run() { loadAnimals(); } }).start(); } private void loadAnimals() { for (int i=0; i