Posts

Accessing next Elements Name in Highcharts Tooltip -

how can next elements name in highcharts for example series: [{ name: 'weight', data: [50, 48, 80, 70]}, { name: 'height',data: [5.8, 5.1, 6.1, 6.0]} ] tooltip: { formatter: function(){ return this.series.name;//i want return here next elements name there way } } in above tooltip iam returning current element name, there way immediate next elements name there..? you can use shared tooltip, take look: http://api.highcharts.com/highcharts#tooltip.shared

qt - Get meta data from delegated files using QML -

i'm creating music player ubuntu touch in qml , have things appreciate since i'm new qml. i have list of tracks directory, want show meta data (artist, track name, year, album , on) instead of filename. using qt.multimedia able meta data playing track, can't find how per file folderlistmodel delegated files. how that? this current code: column { anchors.centerin: parent anchors.fill: parent listview { id: musicfolder folderlistmodel { id: foldermodel folder: musicdir showdirs: false namefilters: ["*.ogg","*.mp3","*.oga","*.wav"] } width: parent.width height: parent.height model: foldermodel delegate: listitem.subtitled { ...

java - Autocomplete using Solr & Spring - issue with multiple words -

i have indexed database of locations using spring data solr. have following fields: <field name="id" type="string" indexed="true" stored="true" required="true" multivalued="false" /> <field name="name" type="text_ws" indexed="true" stored="true"/> <field name="autocomplete" type="lowercase" indexed="true" stored="false"/> i trying implement autocomplete feature. ajax call handled controller calls repository with: list<poisearch> findbyautocompletestartingwith(string autocomplete, pageable pageable); this works fine search "california" or "los". when try multiple words "los ang" exception: severe: servlet.service() servlet [spring-mvc] in context path [/xxx] threw exception [request processing failed; nested exception org.springframework.dao.invaliddataaccessapius...

How to create a custom-shaped bitmap marker with Android map API v2 -

Image
this question has answer here: how can create speech-bubble border google marker custom icon using picasso? 1 answer i developing android application i'm using google map api v2. need show user location on map custom markers. each marker show picture of user url. image must downloaded in asynchronous mode server. see attached screenshot example. how add image , custom information in marker? in google maps api v2 demo there markerdemoactivity class in can see how custom image set googlemap. // uses custom icon. msydney = mmap.addmarker(new markeroptions() .position(sydney) .title("sydney") .snippet("population: 4,627,300") .icon(bitmapdescriptorfactory.fromresource(r.drawable.arrow))); as replaces marker image might want use canvas draw more complex , fancier stuff: bitmap.config conf = bitmap.config.argb...

javascript - split string in two on given index and return both parts -

i have string need split on given index , return both parts, seperated comma. example: string: 8211 = 8,211 98700 = 98,700 so need able split string on given index , return both halves of string. built in methods seem perform split return 1 part of split. string.slice return extracted part of string. string.split allows split on character not index string.substring need returns substring string.substr similar - still returns substring try function splitvalue(value, index) { return value.substring(0, index) + "," + value.substring(index); } console.log(splitvalue("3123124", 2));

audio - Android Musicplayer play same sound more than one at atime -

private mediaplayer mpintro; mpintro = mediaplayer.create(this, r.raw.bgmusic); mpintro.setlooping(true); mpintro.start(); these mediaplayer code plays in app background continuously, altough ı have small problem that. when app in background or close (without force close) still plays sound, launch again plays twice , everytime more. how can stop or pause , 1 sound? ps:i not want sound file in app apk, how can call folder? in main activity handle example override onpause(), onstop() methods. if develop in eclipse, push right mousebutton-->source-->override/implement methods. here choose onpause() or onstop() method , added code: @override protected void onpause(){ if(mpintro!=null){ mpintro.stop(); } super.onpause(); } same onstop(). depends on want. if want stop mediaplayer, should work. if want pause player, play again if resume app, call: @override protected void onpause(){ if(mp...

iframe - Keep listening for jquery keydown events regardless of focus -

the situation i building basic slide deck in html, css & javascript. based on jquery cycle plugin. slides simple li items contain either images, text or iframes (e.g. youtube, or webpage i.e not pages live on domain/have control over). have next , previous buttons working jquery keydown working well, user not have use mouse move through slides the problem when have keyed through li contains iframe, if user clicks iframe focus shifted iframe (as you'd expect) , in order move next slide have refocus onto next or previous buttons mouse click. there anyway keep page listening keydown events in parent regardless of focus within page is? also if possible it great if there solution involved automatically bringing iframe focus (as maintaining next/prev mentioned) when slide active example use space bar play/pause youtube video , click left move next slide. want not have use mouse if not necessary. key press code below (you'd need cycle plugin & of code deck wo...