Posts

Featured post

Integrate a "Search Maps" function in an Android app -

the google maps application features search box (with autosuggestion) allows search address, resulting in marker being placed on map of google maps application. is possible re-use functionality in custom android app, text box presented, resulting in geopoint being delivered custom app, app can place marker somewhere ? in other words, google maps application expose service or intent can used custom application ? if so, how can integration done ? if not, can provide pointer on how custom implementation can realized ? to acquire location named address, need use statement geocoder.getlocationfromname("london",5). return set of matches (5 in example), can either use first one, or show set user select right one. http://developer.android.com/reference/android/location/geocoder.html once have location (latitude , longitude) can plot location on map using mapoverlay, , show marker using that. http://developer.android.com/resources/tutorials/views/hello-mapview

Handling an oAuth flow from local HTML files? -

i've got local html + javascript file consumes json api. i'd authenticate users via facebook, i'm not sure if that's possible -- have experience this? i'm unsure of how redirect (back facebook) managed when we're serving file:// context. just it! :) and you'll see. ps maybe should encode characters ":", "/" etc

messagebox - Silverlight: Message box prompting user to enter some text? -

i'm using silverlight 4. i'd message box prompts user enter text. possible? far, looks option ask user click button. you have create new child window in visual studio , build input form in child window.

What's the difference between UPnP AV and DLNA? -

am right in thinking if i'm dlna 1.5 compliant, i've implemented upnp av? dlna me besides specifying minimum format requirements? isn't dlna built on top of upnp? know sure dlna device discovery based on ssdp (upnp's device discovery protocol). dlna add in content discovery or content delivery specification? for example, boxee , xbmc both support upnp - don't work dlna devices? looking @ dlna , upnp whitepapers, upnp , dlna different although solve similar problems dlna adopts specific things upnp ( see dlna whitepaper page 5 ). it's incorrect dlna subset of upnp. a dlna device able discover upnp server might not able more if both sides don't agree av format. haven't verified this. it's more of understand after reading papers. looking @ this , seems xbmc server not support dlna. explain above situation.

How can I change what python interprets as a integer? -

how can change python interprets integer? example: 94*n valid integer. anything possible when smell old spice , use python's language services generate ast.

Getting number of hits without pagination in sunspot 1.2 on ruby on rails 3 -

i've installed sunspot ruby on rails 3 project, can't seem find way total hits search query. this search request @search = sunspot.search(job) fulltext params[:job] paginate(:page => params[:offset], :per_page => 25) end it works except need total number of real hits, not total results returned (in case 25 because of :per_page => 25) in other words, want able display: showing 1 25 out of 883 jobs found any appreciated! thanks the method total works here. query_results = sunspot.search(recipe) keywords(params[:qs]) paginate(:page=>params[:page], :per_page=>30) end @search_results = query_result.results @search_total = @search_results.total or, in view, total_entries works on results object. %div search = params[:qs] returned = pluralize(@search_results.total_entries, 'result')

java - Repast restart issue -

i'm developing artificial intelligent program explore given space resources. i'd run multiple scenarios in order collect data , output file. i used "multiple runs" option in gui , stop() when 1 module run finished (all resources have been explored). problem when runs model second turn, doesn't work properly. what mean after running once need kill application exiting because restart option doesn't work properly. is there "restart" forgets do? because if exit application , run again works perfectly edited it's more clear: i use repast platform in order simulate exploration mars. have 3 kinds of agents, scouting, digging , transporting. communicate among them schedule tasks , other things. the first time run simulation runs smoothly. , when mineral resources of planet have been explored restart model , try again can collect data. the problem is, when use "restart" option simulation doesn't run well. if exit (not r