Search Results

Search found 11 results on 1 pages for 'dara'.

Page 1/1 | 1 

  • C# convert binary dara to string?

    - by Tom
    Hi, just going through the registry retrieving values and binary is making my file outputer fall. I was wondering how could i convert Subkey.getValue(value[i]) into a String if the Value type is binary? Thank you in advance

    Read the article

  • Becoming a better Android programmer

    - by Drew Dara-Abrams
    Any suggestions on how to become a better Android programmer? I'm past intro tutorials, which mainly focus on how to use pieces of the SDK, but I still struggle to structure big Android apps. Obviously the best use of my time is continuing with my coding projects, but I'm wondering if I should be learning more about Android particulars, solidifying my somewhat shaky Java knowledge, going back to object-oriented fundamentals or patterns...? Pointers to resources (books, example apps, sites) you've found helpful would be great.

    Read the article

  • SQLiteOpenHelper.getWriteableDatabase() null pointer exception on Android

    - by Drew Dara-Abrams
    I've had fine luck using SQLite with straight, direct SQL in Android, but this is the first time I'm wrapping a DB in a ContentProvider. I keep getting a null pointer exception when calling getWritableDatabase() or getReadableDatabase(). Is this just a stupid mistake I've made with initializations in my code or is there a bigger issue? public class DatabaseProvider extends ContentProvider { ... private DatabaseHelper databaseHelper; private SQLiteDatabase db; ... @Override public boolean onCreate() { databaseHelper = new DatabaseProvider.DatabaseHelper(getContext()); return (databaseHelper == null) ? false : true; } ... @Override public Uri insert(Uri uri, ContentValues values) { db = databaseHelper.getWritableDatabase(); // NULL POINTER EXCEPTION HERE ... } private static class DatabaseHelper extends SQLiteOpenHelper { public static final String DATABASE_NAME = "cogsurv.db"; public static final int DATABASE_VERSION = 1; public static final String[] TABLES = { "people", "travel_logs", "travel_fixes", "landmarks", "landmark_visits", "direction_distance_estimates" }; // people._id does not AUTOINCREMENT, because it's set based on server's people.id public static final String[] CREATE_TABLE_SQL = { "CREATE TABLE people (_id INTEGER PRIMARY KEY," + "server_id INTEGER," + "name VARCHAR(255)," + "email_address VARCHAR(255))", "CREATE TABLE travel_logs (_id INTEGER PRIMARY KEY AUTOINCREMENT," + "server_id INTEGER," + "person_local_id INTEGER," + "person_server_id INTEGER," + "start DATE," + "stop DATE," + "type VARCHAR(15)," + "uploaded VARCHAR(1))", "CREATE TABLE travel_fixes (_id INTEGER PRIMARY KEY AUTOINCREMENT," + "datetime DATE, " + "latitude DOUBLE, " + "longitude DOUBLE, " + "altitude DOUBLE," + "speed DOUBLE," + "accuracy DOUBLE," + "travel_mode VARCHAR(50), " + "person_local_id INTEGER," + "person_server_id INTEGER," + "travel_log_local_id INTEGER," + "travel_log_server_id INTEGER," + "uploaded VARCHAR(1))", "CREATE TABLE landmarks (_id INTEGER PRIMARY KEY AUTOINCREMENT," + "server_id INTEGER," + "name VARCHAR(150)," + "latitude DOUBLE," + "longitude DOUBLE," + "person_local_id INTEGER," + "person_server_id INTEGER," + "uploaded VARCHAR(1))", "CREATE TABLE landmark_visits (_id INTEGER PRIMARY KEY AUTOINCREMENT," + "server_id INTEGER," + "person_local_id INTEGER," + "person_server_id INTEGER," + "landmark_local_id INTEGER," + "landmark_server_id INTEGER," + "travel_log_local_id INTEGER," + "travel_log_server_id INTEGER," + "datetime DATE," + "number_of_questions_asked INTEGER," + "uploaded VARCHAR(1))", "CREATE TABLE direction_distance_estimates (_id INTEGER PRIMARY KEY AUTOINCREMENT," + "server_id INTEGER," + "person_local_id INTEGER," + "person_server_id INTEGER," + "travel_log_local_id INTEGER," + "travel_log_server_id INTEGER," + "landmark_visit_local_id INTEGER," + "landmark_visit_server_id INTEGER," + "start_landmark_local_id INTEGER," + "start_landmark_server_id INTEGER," + "target_landmark_local_id INTEGER," + "target_landmark_server_id INTEGER," + "datetime DATE," + "direction_estimate DOUBLE," + "distance_estimate DOUBLE," + "uploaded VARCHAR(1))" }; public DatabaseHelper(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); Log.v(Constants.TAG, "DatabaseHelper()"); } @Override public void onCreate(SQLiteDatabase db) { Log.v(Constants.TAG, "DatabaseHelper.onCreate() starting"); // create the tables int length = CREATE_TABLE_SQL.length; for (int i = 0; i < length; i++) { db.execSQL(CREATE_TABLE_SQL[i]); } Log.v(Constants.TAG, "DatabaseHelper.onCreate() finished"); } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { for (String tableName : TABLES) { db.execSQL("DROP TABLE IF EXISTS" + tableName); } onCreate(db); } } } As always, thanks for the assistance! -- Not sure if this detail helps, but here's LogCat showing the exception:

    Read the article

  • Python: fetching SVG file using urllib is returning binary when I need ASCII

    - by Drew Dara-Abrams
    I'm using urllib (in Python) to fetch an SVG file: import urllib urllib.urlopen('http://alpha.vectors.cloudmade.com/BC9A493B41014CAABB98F0471D759707/-122.2487,37.87588,-122.265823,37.868054?styleid=1&viewport=400x231').read() which produces output of the sort: xb6\xf6\x00\xb3\xfb2\xff\xda\xc5\xf2\xc2\x14\xef\xcd\x82\x0b\xdbU\xb0\x81\xcaF\xd8\x1a\xf6\xdf[i)\xba\xcf\x80\xab\xd6\x8c\xe3l_\xe7\n\xed2,\xbdm\xa0_|\xbb\x12\xff\xb6\xf8\xda\xd9\xc3\xd9\t\xde\x9a\xf8\xae\xb3T\xa3\r`\x8a\x08!T\xfb8\x92\x95\x0c\xdd\x8b!\x02P\xea@\x98\x1c^\xc7\xda\\\xec\xe3\xe1\xbe,0\xcd\xbeZ~\x92\xb3\xfa\xdd\xfcbyu\xb8\x83\xbb\xbdS\x0f\x82\x0b\xfe\xf5_\xdawn\xff\xef_\xff\xe5\xfa\x1f?\xbf\xffoZ\x0f\x8b\xbfV\xf4\x04\x00' when I was expecting more like this: <?xml version='1.0' encoding='UTF-8'?> <svg xmlns="http://www.w3.org/2000/svg" xmlns:cm="http://cloudmade.com/" width="400" height="231"> <rect width="100%" height="100%" fill="#eae8dd" opacity="1"/> <g transform="scale(0.209849975856)"> <g transform="translate(13610569, 4561906)" flood-opacity="0.1" flood-color="grey"> <path d="M -13610027.720000000670552 -4562403.660000000149012 I guess this is an issue of binary vs. ASCII. Can anyone help me (a Python newbie) with the appropriate conversion so that I can get on with parsing and manipulating the SVG code?

    Read the article

  • only update certain model attributes using Backbone.js

    - by Drew Dara-Abrams
    With Backbone, I'm trying to update and save to the server just one attribute: currentUser.save({hide_explorer_tutorial: 'true'}); but I don't want to send all the other attributes. Some of them are actually the output of methods on the server-side and so they are not actually true attributes with setter functions. Currently I'm using unset(attribute_name) to remove all the attributes that I don't want to update on the server. Problem is those attributes are then no longer available for local use. Suggestions on how to only save certain attributes to the server?

    Read the article

  • Unisciti alla Customer Experience Revolution! 27 settembre 2012, Milano

    - by antonella.buonagurio
    Si tiene giovedì 27 settembre a Milano Oracle Customer Experience Briefing, un evento pensato per riflettere sulla Customer Experience vista come strategia per dare vita a processi più completi ed innovativi per generare e gestire l’interazione con i consumatori, su tutti i canali. I lavori si terranno in particolare dalle 10.30 alle 13.00 presso Casa dell’Energia (Piazza Po 3). Enrico Finzi, Sociologo e Presidente di AstraRicerche, condividerà la propria visione sul tema e ne discuterà insieme agli esperti di Accenture e Oracle. L'incontro, rivolto in particolare alle aziende dei settori Retail e Beni di Consumo, consentirà dunque di comprendere perché la Customer Experience sia diventata la componente più importante e strategica del business delle imprese e di scoprire come essa accelleri l’acquisizione di nuovi clienti, incrementi la fidelizzazione ad un brand/prodotto/servizio, migliori l’efficienza operativa e sostenga le vendite. L’evento darà inoltre la possibilità di capire come le soluzioni di Customer Experience possono aiutare le aziende a far vivere questa esperienza ai clienti in modo coerente e personalizzato, attraverso tutti i canali e su tutti i dispositivi, ottenendo risultati misurabili.La partecipazione è gratuita su invito ed è riservata alle aziende finali. Per registrarsi all’evento è possibile collegarsi a questo link.

    Read the article

  • Instalar SQL Server 2008

    - by Jason Ulloa
    En este post trataré de explicar los pasos para la instalación de SQL y su posterior configuración. Primer paso: Instalación de las reglas de Soporte (Setup Support Rules) Está será la primer pantalla de instalación con la que nos toparemos cuando tratemos de instalar sql server. En ella, únicamente debemos dar clic en siguiente(next). Paso 2: Selección de las características de instalación de SQL Server (Feature Selection) Este es a mi parecer el paso mas importante del proceso de instalación de SQL, pues es el que nos permitirá seleccionar todos los componentes que este tendrá posteriormente Acá lo importante es: Servicios de bases de datos y herramientas de administración. Todas las demás son plus del motor.   Paso 3: Configuración de la Instancia En este paso, no debemos preocuparnos por nada. Únicamente presionamos siguiente. Paso 4: Requerimientos de espacio en disco Nuevamente en esta instancia no tendremos trabajo alguno. Únicamente es una pantalla informativa de SQL en donde se muestra el espacio actual del disco y el espacio que la instalación de SQL Server consumirá. Presionamos siguiente (next). Paso 5: Configuración del servidor Este paso es uno de los mas importantes, pues en el le indicaremos a SQL que usuario utilizará para autenticarse y levantar cada uno de los servicios que hayamos seleccionado al inicio. Generalmente cuando se trabaja en local el usuario NT AUTHORITY\SYSTEM es la mejor opción. Si en este paso, seleccionamos un usuario con permisos insuficientes SQL nos dará un error. Presionamos siguiente (next) Paso 6: Configuración del motor de bases de datos En este paso, nos enfocaremos en la pestaña Account Provisioning, que será en la que le indiquemos el usuario con el que el motor de bases de datos funcionará por defecto. Lo mas recomendado sería hacer clic en la opción add current user, la cual agregará el usuario de windows  que se encuentre en ese momento. También, podremos seleccionar si queremos el modo de autenticación de SQL o el modo Mixto, que incluye autenticación de SQL Server y Windows. Para nuestra instalación seleccionaremos unicamente modo de autenticación de SQL. Una vez que agregamos el usuario presionamos siguiente (next) Paso 7:  Finalizar la configuración Luego de los pasos anteriores, las demás pantallas no requieren nada especial. Únicamente presionar siguiente y esperar a que la instalación de SQL termine.

    Read the article

  • how to set the output image use com.android.camera.action.CROP

    - by adi.zean
    I have code to crop an image, like this : public void doCrop(){ Intent intent = new Intent("com.android.camera.action.CROP"); intent.setType("image/"); List<ResolveInfo> list = getPackageManager().queryIntentActivities(intent,0); int size = list.size(); if (size == 0 ){ Toast.makeText(this, "Cant find crop app").show(); return; } else{ intent.setData(selectImageUri); intent.putExtra("outputX", 300); intent.putExtra("outputY", 300); intent.putExtra("aspectX", 1); intent.putExtra("aspectY", 1); intent.putExtra("scale", true); intent.putExtra("return-data", true); if (size == 1) { Intent i = new Intent(intent); ResolveInfo res = list.get(0); i.setComponent(new ComponentName(res.activityInfo.packageName, res.activityInfo.name)); startActivityForResult(i, CROP_RESULT); } } } public void onActivityResult (int requestCode, int resultCode, Intent dara){ if (resultCode == RESULT_OK){ if (requestCode == CROP_RESULT){ Bundle extras = data.getExtras(); if (extras != null){ bmp = extras.getParcelable("data"); } File f = new File(selectImageUri.getPath()); if (f.exists()) f.delete(); Intent inten3 = new Intent(this, tabActivity.class); startActivity(inten3); } } } from what i have read, the code intent.putExtra("outputX", 300); intent.putExtra("outputY", 300); is use to set the resolution of crop result, but why i can't get the result image resolution higer than 300x300? when i set the intent.putExtra("outputX", 800); intent.putExtra("outputY", 800); the crop function has no result or crash, any idea for this situation? the log cat say "! ! ! FAILED BINDER TRANSACTION ! ! !

    Read the article

1