Posts

android - Presentation Display: wrong DPI's -

my application runs in phone & uses presentation display render scene. the phone samsung galaxy s4 around 480dpi's. i connect 40" tv mhl/hdmi adapter. seen in logcat metrics: {"hdmi screen": 1920 x 1080, 60.000004 fps, density 320, 320.0 x 320.0 dpi, touch external, rotation 0, type hdmi, flag_secure, flag_supports_protected_buffers, flag_presentation} my problem is, dpi's of secondary display wrong! density much, lower 320dpi. wonder value comes from, , if adjustable. i'd use value in mdpi land font rendered smaller. if you're looking @ dpi in displaymatrics class- isn't accurate. depends on field being set oem when build android, field isn't set causes no bugs isn't used anywhere. can't trust native screen device built with. trusting outside screen less right.

android - Listview with button OnItemClickListener is not calling -

i create custom listview textview , 2 imagebutton . onitemclicklistner not calling. here code police_station_list = (listview) findviewbyid(r.id.police_station_listview_xml); adapter = new arrayadapter<string>(this, r.layout.coustome_listview, r.id.district_listview_xml1, police_station_name); psadapter = new police_station_adapter(this); police_station_list.setadapter(psadapter); police_station_list.setonitemclicklistener(psadapter); here custom arrayadapter class: public class police_station_adapter extends arrayadapter<string> implements onitemclicklistener{ context context; public police_station_adapter(context context) { //super(context, r.layout.police_station_listview, r.id.police_station_listview_textview, police_station_name); super(context, r.layout.police_station_listview, police_station_name); this.context = context; } private class viewholder { textview tv; imagebutton mobile, phone; public viewholder...

html - Is it possible to place a character on a border line displayed in a table? -

is possible place character on border line displayed in table? i trying discover way re-create musical staff notation webpages using html rather inserting images. i have got staff render fine, 5 horizontal lines divided vertical bars using in css header: table.musstaff{border-collapse:collapse;} .trms{border-bottom:2px solid black;} .tdms{border-left:2px solid black;} and need render musical staff: <table class="musstaff"> <tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr> <tr class="trms"><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr> <tr class="trms"><td>&nbsp;&nbsp;&nbsp;&nbs...

jasperserver - retrieving the report's parameters dynamically -

Image
is there way retrieve jasperreports 's report parameters? which means don't have know parameters retrieve report in our application.the parameters prompts can embedded in our application. once report embedded in our application , if want run it, parameters prompts displayed automatically if in jasperrepoprts server . this called jasper http api ( link ) you build url jasper report. assuming hosting jasper reports server. can use url via iframe in html. if see parameters below, can choose skin report (which remove components), add themes suit application etc. can pass parameters via rest format e.g.. &projectid=221 if want pop up: in jrs, go edit report. in controls , resources, can add control input, if want. this show popup , can enter value. hope looking for.

haskell - Representing sum types in sql with Persistent, and Esqueleto joins -

i have been trying figure out sensible way represent haskell sum types in sql backend using persistent. my target haskell data type along lines of data widget = foowidget int | barwidget t.text data helement = helement { name :: t.text , widget :: widget } i modeling these using following persistent data types: element name t.text foo elementid elementid size int bar elementid elementid colour t.text there ever either foo or bar each element, never both. i want use left outer join select elements , corresponding foo or bar. esqueleto expression is: select $ $ \(elem `leftouterjoin` foo `leftouterjoin` bar) -> on (just (elem ^. elementid) ==. foo ?. fooelementid) on (just (elem ^. elementid) ==. bar ?. barelementid) return (elem, foo, bar) however, when execute code, error: user error (postgresql.withstmt': bad result status fatalerror (("pgres_fatal_error","error: missing from-clause entry table if rem...

ios - How to pause (and resume) background location monitoring when low battery? -

i'm writing location tracking application ios 7.1 (iphone) requires stop or pause background location monitoring when battery 30% , lower. location monitoring should resume in background when battery improves. how can this? i'm using significant location change update (cllocationmanager api methods) background location monitoring. thanks! as per documentation of startmonitoringsignificantlocationchanges: if start service , application subsequently terminated, system automatically relaunches application background if new event arrives. in such case, options dictionary passed application:didfinishlaunchingwithoptions: method of application delegate contains key uiapplicationlaunchoptionslocationkey indicate application launched because of location event. upon relaunch, must still configure location manager object , call method continue receiving location events. when restart location services, current event delivered delegate immediately. ...

mysql - Best way to insert all the combinations -

i have been thinking quite bit , can't seem figure out way in plain mysql. i have list of words (size not fixed): word11 word21 word31 word41 for each 1 of words, have list of synonyms (size not fixed). word11, intance: word12 word13 word14 word15 word16 my goal different possibibilities: word11 word21 word31 word41 word12 word21 word31 word41 word13 word21 word31 word41 word14 word21 word31 word41 ... word11 word21 word31 word417 word11 word21 word31 word418 i thought using temporary table store different results. for each word, , each result stored in temporary table, insert new synonyms instead. the first iteration word11 give word11 word21 word31 word41 word12 word21 word31 word41 word13 word21 word31 word41 word14 word21 word31 word41 word15 word21 word31 word41 word16 word21 word31 word41 for iteration 2, each 1 of these entries, insert synonyms replacing word21 synonyms. but seems tedious , there might better way (not sur...