Posts

chart.js - chartjs Line chart: scale respect value on x-axis -

Image
i new on chartjs. i using line chart. labels include value: [100,200,1000] the distance between labels same, , not depend on value of label. chart requires distance between [200] label , [1000] label 8 times longer distance between [100] , [200] label. please me stuck. chart.js x labels not number scales. there community extension ( http://dima117.github.io/chart.scatter/ ) this. linked in documentation ( http://www.chartjs.org/docs/#advanced-usage-community-extensions ).

android universal image loader not working correctly -

i have cursor adapter bindview follows: @override public void bindview(view view, context context, cursor cursor) { ... imageview imageview = (imageview) view.findviewbyid(r.id.icon); imageloader imageloader = imageloader.getinstance(); displayimageoptions options = new displayimageoptions.builder() .cacheondisk(true).cacheinmemory(true) .showimageonloading(r.drawable.ic_contact_picture).showimageonfail(r.drawable.ic_contact_picture) .resetviewbeforeloading(true) .displayer(new fadeinbitmapdisplayer(300)).build(); imageloader.displayimage(url, imageview, options); ... } the problem i'm getting is: when scroll through listview, item's imageview image gets displayed in item's imageview. why happen? is internal recycling of listview items causing problem? as say,the problem maybe because of recycler mechanism of listview,you should use viewholder hold item view performance o...

Android database storage formats appropriate for JavaScript access -

i'm developing android application, typically small database (hundreds thousand or main entries, plus similar order of magnitude in joined tables) populated user. there file associated each main entry, kept separate, , not part of question. in current prototype, structured data stored in sqlite database in usual way, , synced between devices uploading file application folder on google drive. allows me avoid having provide user storage, hope stick to. storing files here has happy side effect can access them via javascript code in web page using google drive api. javascript interacting remote sqlite file incredibly ugly thing attempt. (downloading database server-side , handling there option sounds not great either.) wondering if has recommendations of best practice approach here, given have web-based version of app accessing same data. the obvious sensible idea seems be exporting sqlite other structured format xxx (like xml, json, csv, ...) first, uploading xxx file...

python - Flask-Sqlite posting to DB from webform -

i have started learning flask , tried find answer how post sqlite db webform. far haven't managed work , bit lost this. manage print values db based on code sample simplypython don't know how add new ones webform. i need able address elements, open connection database, insert values, save , close connection. far aware should add post method app.py , use request.form statement pull elements when submit button pressed. then code should automatically display values on index html, works. please me code need add app.py file values added db , add form action webform-section on html file? index.html <!doctype html> <html> <head> <title>flask intro</title> <!-- <meta name="viewport" content="width=device-width, initial-scale=1.0"> --> </head> <body> <div class="container"> <h3 potsit </h3> {% post in posts %} titleotsikko: {{post.title }} ...

java - Adding tab Navigation to my Fragment -

i new android developing . i've made tab navigation activity, transfer code fragment project, encountered errors . can me proper way inside fragment . note : used import android.support.v4.app.fragment; on both frmslide , fragmentfeedfragment my frmslide code this public class frmslide extends appcompatactivity implements navigationdrawerfragment.navigationdrawercallbacks { /** * fragment managing behaviors, interactions , presentation of navigation drawer. */ private navigationdrawerfragment mnavigationdrawerfragment; /** * used store last screen title. use in {@link #restoreactionbar()}. */ private charsequence mtitle; viewpager viewpager; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_frm_slide); mnavigationdrawerfragment = (navigationdrawerfragment) getsupportfragmentmanager().findfragmentbyid(r.id.navigation_drawer); mtitle = gettitle(); ...

c - Difference between #include <filename> & #include "filename" -

this question has answer here: what difference between #include <filename> , #include “filename”? 26 answers here preprocessor directive in c : #include <filename> we can write in way also: #include "filename" is there difference between these two? in general, <> version should in "system directories", while "" should in "local directories" first, , system directories. what means implementation dependent. in cases "" in current directory first, in implementations in directory of source ( .c ) file first (and compilers have switch that). also, behavior different w.r.t. "set of system directories" search if "local directory search" fails (the same <> or not).

windows - echoing dynamically generated variable -

set css_folder_source=.\css set js_folder_source=.\js %%a in (js, css ) ( if defined %%a_folder_source ( echo %%%a_folder_source%% ) ) i want read contents of both folders. don't know how dynamically generate folder_source names use delayed expansion : setlocal enabledelayedexpansion ............ %%a in (js css) ( echo !%%a_folder_source! )