Posts

what is the best size to use for an Android application icon -

Image
what best size use android application icon? 72*72? i want install application on high resolution screen (hdpi). thanks have here , here . 72 x 72px correct hdpi, actual content within being 60px 60px. you'd want support other densities though avoid upsetting people other devices.

git - Versioning file system with Amazon S3 as backend -

i'm trying make following work on debian computers , 1 os x laptop. what have kind of versioning file system uses amazon s3 backend. what thinking use s3fs (using fuse) mount bucket, make filesystem uses git makes new commit everytime write file (i complete version history x days). mounted folder should show latest version of files. 1 of problems don't know how solve (due lack of experience, assume) synchronise files local folder. of course, download files not bandwidth friendly. another problem current version of s3fs not seem work macfuse. further, not happen prevent files becoming corrupt if 2 computers write file @ same time. if have understood correctly, git implements kind of file locking , not depend on file locking of operating system. what outline make work? files store these way .tex-files , vector images. i know there solutions in existence (like dropbox) don't closed source. first, let me not recommend blindly running git on s3. git prod...

streaming - How to capture microphone input in VLC? -

i'm trying capture microphone input in vlc media player via http interface , stream far have arrived @ nothing. possible? which platform? i'm on mac know sure possible vlc 2.0 other platforms should work well. haven't tested commands though. mac: use vlc 2.0.0 or later , utilize qtsound module: vlc -vvv qtsound:// win: use sth like: vlc dshow:// :dshow-vdev="none" :dshow-adev="your audio device" linux: use sth like: vlc alsa://plughw:0,0

Java: how to locate an element via xpath string on org.w3c.dom.document -

how locate element/elements via xpath string on given org.w3c.dom.document? there seems no findelementsbyxpath() method. example /html/body/p/div[3]/a i found recursively iterating through child node levels quite slow when there lot of elements of same name. suggestions? i cannot use parser or library, must work w3c dom document only. try this: //obtain document somehow, doesn't matter how documentbuilder b = documentbuilderfactory.newinstance().newdocumentbuilder(); org.w3c.dom.document doc = b.parse(new fileinputstream("page.html")); //evaluate xpath against document xpath xpath = xpathfactory.newinstance().newxpath(); nodelist nodes = (nodelist)xpath.evaluate("/html/body/p/div[3]/a", doc.getdocumentelement(), xpathconstants.nodeset); (int = 0; < nodes.getlength(); ++i) { element e = (element) nodes.item(i); } with following page.html file: <html> <head> </head> <body> <p> ...

math - Calculating Largest Possible Rectangle -

i'm uploading images website. they're sorts of different dimensions. how can determine largest 4:3 rectangle out of particular image without rotating image? if aspect ratio less 4:3, keep original width , use height of width*3/4 . if aspect ratio greater 4:3, keep original height , use width of height*4/3 .

web services - Call webservice from gps device -

i have web service want call gps device. have hosted web service on hosted server , web service has method called upload. method accept string parameter. currently calling web service mobile phone url http://www.abc.com/default.asmx/upload?str=1,73.0667,33.6 now want call web method gps device, problem gps device accept ip address , port no. not accept url , web method. create proxy service callable gps device ("ip address , port no."), in turn makes desired webservice call, whatever formatting data needed, , returns gps device in whatever format want gps device.

winforms - Odd DataGridView vertical scrolling behavior -

i have windows forms datagridview. fill , update using code below, pretty straightforward , done on ui thread. for strange reason size of vertical scrollbar (wich set visible when needed) not reflect amount rows available. if scroll way down, still cannot see last rows. can tell selecting lines below (and bringing them view) using arrow down key. what possibly reason this. need sort of beginudate or suspendlayout or something? control embedded through interop in mfc application. andy idea how track down problem? known bug? google doesn't think so, seems. here code use. adding or inserting row: int newrowindex = insertat; if (insertat < 0 || insertat > this.datagridview.rows.count) { newrowindex = this.datagridview.rows.add(); } else { this.datagridview.rows.insert(insertat, 1); } removing row: this.datagridview.rows.remove(index); clearing: this.datagridview.rows.clear(); updating row: this.datagrid[0, rowindex].value = somestring; this.d...