Posts

Featured post

How to mention the localhost in android -

i trying call localhost in android application. unfortunately not possible used several methods emulator local host http://10.0.2.2/android/dbconnection.php and network ip address http://192.168.1.xx/android/dbconnection.php also http://localhost:8080/android/dbconnection.php but nothing connected localhost. purpose refer stackoverflow answers not working i facing same problem when worked on localhost. referred stackoverflow answer got solution create new emulator works fine in new emulator.

Best-practices sharding complete MongoDB -

we changed logic in our mongodb-setup follows: half of replica-sets in cluster contain databases , corresponding collections not sharded. other half contain sharded collections. while databases still spread around replica-sets curious know: there disadvantage in having database on server doesn't hold of collections? there kind of meta-data held mongodb waste ressources? is there disadvantage in having database on server doesn't hold of collections? this never case sharding. collections start on first (master) server, contains database (i think of enabling sharding on database level, do), , scale out across other shards (replica sets). the databases , collections made on other shards data needed moved them. as such further questions have been mad inert knowledge. edit "which contains database" i mean copy of database. this hinted next paragraph state databases , collections made on each shard needed. the shard, or rather replica set i...

How to get the Captured Image's Creation Dates in Android -

iam developing 1 android application, in iam using camera functionality. there way captured images's creation dates in android? thanks help. through exif interface, if camera write it. take here exifinterface exif = new exifinterface(pathtotheimage); string datetime = exif.getattribute(exifinterface.tag_datetime);

php - How i can return specified fields in mongodb find() coursor? -

i try: $fields = array('name'=>true); find (array(array(), $fields)) but it's not working (i nothing) , can't see mistake. sorry :( the php function find not work that. try: find(array(), array('name'=>1)) (basically omit surrounding array ) for reference here documentation page: http://php.net/manual/en/mongocollection.find.php

Coordinates-based text display upon an image with Django's template system -

Image
i trying update excel-map data fetched django , display on page linked admin. the excel-"map" : using xlrd & cie libs i'm working on fetching / updating data part fellow dev told me have used image instead. my question : how such thing ? displaying copy of above spreadsheet , using row-based coordinates write data want ? (text data) do guys know way work coordinate-based text display in django's templates ? thanks can give me ! i ended using pil library. quite easy , summarized following code : from pil import image pil import imagedraw pil import imagefont im = image.open('path/to/map.png') font = imagefont.truetype('/usr/share/fonts/dejavu/dejavusans.ttf', 7) draw = imagedraw.draw(im) draw.text((x, y), sentence, font=font, fill='black') response = httpresponse(mimetype='image/png') im.save(response, 'png') return response logic behind x , y irrelevant here, bear in mind start quite illogica...

c# - Winforms user control class accessible by all application -

i'm creating winforms application needs control class manage app components. i thinking class inherits component , glued in main form of application. how access control class point of application? correct way this? or should change mind architecture? you create static class or single instance class , use allover application. note: static class should inherit system.object using way not possible inherit component if require derive component can go single instance approach. check out singleton implementation hope helps

javascript - Load scripts in bootstrap modal when getting fragment of page -

i'm getting fragment of page , loading in bootstrap modal. this fragment of page includes jquery required load google maps when modal loads content, scripts getting stripped subsequently, maps don't load. even if directly insert scripts inside modal-body class, still stripped. is there workaround @ all? what we're using trigger modal is:- <a href="/stores .topclass" data-target="#storesmodal" data-toggle="modal">launch demo modal</a> i can provide further code in use if needed answer accurately. === edit: providing more code in use on request... so we're including sitewide link triggers bootstrap modal. link triggering modal can seen above , here rest of code in relation modal . what wish load in modal fragment of page @ /stores , code loaded @ url can seen here . page though, wish load inside .modal-container on line 192 necessary scripts reside outside of div in same file, aren't capturing when try lo...