Image, saved to sdcard, doesn’t appear in Android’s Gallery app

A simpler solution is to use the static convenience method scanFile(): File imageFile = … MediaScannerConnection.scanFile(this, new String[] { imageFile.getPath() }, new String[] { “image/jpeg” }, null); where this is your activity (or whatever context), the mime-type is only necessary if you are using non-standard file extensions and the null is for the optional callback … Read more

How do I show a Save As dialog in WPF?

Both answers thus far link to the Silverlight SaveFileDialogclass; the WPF variant is quite a bit different and differing namespace. Microsoft.Win32.SaveFileDialog dlg = new Microsoft.Win32.SaveFileDialog(); dlg.FileName = “Document”; // Default file name dlg.DefaultExt = “.text”; // Default file extension dlg.Filter = “Text documents (.txt)|*.txt”; // Filter files by extension // Show save file dialog box … Read more

Save An Image To Application Documents Folder From UIView On IOS

It’s all good, man. Don’t harm yourself or others. You probably don’t want to store these images in Core Data, since that can impact performance if the data set grows too large. Better to write the images to files. NSData *pngData = UIImagePNGRepresentation(image); This pulls out PNG data of the image you’ve captured. From here, … Read more

How to save all the variables in the current python session?

If you use shelve, you do not have to remember the order in which the objects are pickled, since shelve gives you a dictionary-like object: To shelve your work: import shelve T=’Hiya’ val=[1,2,3] filename=”/tmp/shelve.out” my_shelf = shelve.open(filename,’n’) # ‘n’ for new for key in dir(): try: my_shelf[key] = globals()[key] except TypeError: # # __builtins__, my_shelf, … Read more

Saving images in Python at a very high quality

If you are using Matplotlib and are trying to get good figures in a LaTeX document, save as an EPS. Specifically, try something like this after running the commands to plot the image: plt.savefig(‘destination_path.eps’, format=”eps”) I have found that EPS files work best and the dpi parameter is what really makes them look good in … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)