Posts

How to tell if an Android device will be able to provide a location? -

i'm writing geo app , works nicely, i'm considering how it'll work on devices don't have gps or 3g, , wifi may off or not provide location info. is best bet request location update (or use last known) , assume there way location (whether gps or network) or framework include way see what's available, , avoid geo-lookup delay? i figure on device no gps app should provide ui user specify location, , remember in sharedprefs don't have keep re-entering (i'm thinking devices google tv, , tablets). i'd appreciate suggestions on how handle process of acquiring location in context of various devices have different levels of geo-awareness, , how handle that. you can invoke locationmanager.getallproviders() retrieve location providers, or invoke locationmanager.getproviders(true) retrieve active location providers. boolean hasactivelocationprovider = false; locationmanager locationmanager = context.getsystemservice(context.location_service); ...

api - Where can i find a how-to for writing a wagon for maven 3? -

maven has changed version 2 3 , has changed ioc container plexus google guice. so wagon (to download artifacts sourceforge file release area) maven 2 must rewritten maven 3 satisfy guice. there tutorial / api description / learn how change plexus wagon guice wagon? org.sonatype.aether.connector.wagon.wagonrepositoryconnector example use wagon in maven 3

XNA isometric tiles rendering issue -

Image
i'm working on xna game prototype. i'm trying achieve isometric view of game world (or othographic?? i'm not sure right term projection - see pictures). world should tile-based world made of cubic tiles (e.g. similar minecraft's world), , i'm trying render in 2d using sprites. so have sprite sheet top face of cube, front face , side (visible side) face. draw tiles using 3 separate calls drawsprite, 1 top, 1 side, 1 front, using source rectangle pick face want draw , destination rectangle set position on screen according formula convert 3d world coordinates isometric (orthographic?). (sample sprite: ) this works long draw faces, if try draw fine edges of each block (as per tile grid) can see random rendering pattern in lines overwritten face , not. please note world representation, x left right, y inside screen outside screen, , z down. in example i'm working top face-edges. here (picture): i don't understand why of lines shown , not. rende...

yahoo weather country and city list -

when need weather city put link: http://weather.yahooapis.com/forecastrss?w=713169 but how country city code(id)? maybe xml, rss? thanks see this: forecastrss?w=713169 w parameter woeid. woeid invented yahoo think , means wehereonearthid. google search woeid list , you`ll find answer.

php - Automatically filling a form and submitting it doesn't get the parameters to the server -

i have form filled automatically js my form is: <form id="dosubmit" method="post"> <input type="text" id="usr" /> <input type="password" id="pwd" /> </form> my js is: document.forms["dosubmit"].elements["usr"].value = usr; document.forms["dosubmit"].elements["pwd"].value = psw; document.forms["dosubmit"].action = location.pathname + "user"; document.forms["dosubmit"].submit(); now on next page php, when try use error undefined index , when type print_r($_post) array() any idea how can post form data on next page? your input elements need have name attribute: <form id="dosubmit" method="post" action=""> <input type="text" id="usr" name="usr" /> <input type="password" id="pwd" name="pwd"...

javascript - Facebook JS SDK: access_token in plain text and security -

when user logs facebook using popup displayed fb.login() call, js sdk plants domain cookie containing oauth access_token in plain text. then, cookie being sent server every subsequent request - , it's pretty obvious not every request uses https . isn't security problem? if so, how solve it? an attacker, able sniff network traffic (e. g. wireless lan), can read cookie. , pretend person created for. this not issue because same attack works on facebook pages itself: username/password - authentication done via https. following pages use unencrypted http, contain cookie. there easy-to-use firefox extension allows steeling of cookies, if able sniff network traffic: http://codebutler.com/firesheep ps: stackoverflow.com vulnerable, too.

iphone: Use Core Plot with large number of data point, or another graphing solution? -

i wanting use core plot before work on implementing it, wondering how performs large number of data points. of data want display on line graph has around 5000 data points. can core plot show of data on screen without having scroll see more data? load many points quickly? core plot cache larger graphs this? any comments great. can core plot show of data on screen without having scroll see more data? sure, scale of plot space , axes independent of number of data points. will load many points quickly? it depends on format you're starting (core plot supports several ways of getting data), device you're using, , how define "fairly quickly". gut feeling loading data won't bottleneck no matter format use--drawing 5000 points will. you'll have try see if meet needs. does core plot cache larger graphs this? it caches data in efficient format , there methods add , remove data points without reloading everything. not cache bitmap explicitly....