Taking screenshot programmatically doesnt capture the contents of surfaceVIew

I finally solved this . Below i give some code for anyone who wants to know how to take screenshots of a layout ,pictures from the camera without intent, screenshots(sort of) of the content of a surfaceView and save the screen shot in a folder : public class Cam_View extends Activity implements SurfaceHolder.Callback { protected … Read more

AWS EFS vs EBS vs S3 (differences & when to use?) [closed]

One word answer: MONEY 😀 1 GB to store in US-East-1: (Updated at 2016.dec.20) Glacier: $0.004/Month (Note: Major price cut in 2016) S3: $0.023/Month S3-IA (announced in 2015.09): $0.0125/Month (+$0.01/gig retrieval charge) EBS: $0.045-0.1/Month (depends on speed – SSD or not) + IOPS costs EFS: $0.3/Month Further storage options, which may be used for temporary … Read more

“Not allowed to load local resource: file:///C:….jpg” Java EE Tomcat

sending tag <img src=”https://stackoverflow.com/questions/23969953/c:\images\mypic.jpg”> would cause user browser to access image from his filesystem. if you have to store images in folder located in c:\images i would suggest to create an servlet like images.jsp, that as a parameter takes name of a file, then sets servlet response content to an image/jpg and then loads bytes … Read more

How do I get Django Admin to delete files when I remove an object from the database/model?

You can receive the pre_delete or post_delete signal (see @toto_tico’s comment below) and call the delete() method on the FileField object, thus (in models.py): class MyModel(models.Model): file = models.FileField() … # Receive the pre_delete signal and delete the file associated with the model instance. from django.db.models.signals import pre_delete from django.dispatch.dispatcher import receiver @receiver(pre_delete, sender=MyModel) def … Read more