How to generate and prompt to save a file from content in the client browser? [duplicate]

This “FileSaver” library may help. If you want it to be reasonably cross-browser, you’ll also need this to implement the W3C Blob API in places it’s not already implemented. Both respect namespaces, and are completely framework agnostic, so don’t worry about naming issues. Once you’ve got those included, and as long as you’re only saving … Read more

Wget recognizes some part of my URL address as a syntax error

The & has a special meaning in the shell. Escape it with \ or put the url in quotes to avoid this problem. wget http://search.yahoo.com/404handler?src=search\&p=food+delicious -O test.html or wget “http://search.yahoo.com/404handler?src=search&p=food+delicious” -O test.html In many Unix shells, putting an & after a command causes it to be executed in the background.

c# Bitmap.Save transparancy doesn’t save in png

Are you sure the pixel format of the Bitmap is System.Drawing.Imaging.PixelFormat.Format32bppArgb? I just stumbled on this question because I was having the same problem, but it was because I was loading an image which had no alpha component to its pixel format. I did Bitmap output = original.Clone(rect, System.Drawing.Imaging.PixelFormat.Format32bppArgb); and it properly saved the PNG … Read more

Android webView saveState

This can be handled by overrwriting onSaveInstanceState(Bundle outState) in your activity and calling saveState from the webview: @Override protected void onSaveInstanceState(Bundle outState) { webView.saveState(outState); super.onSaveInstanceState(outState); } Then recover this in your onCreate after the webview has been re-inflated of course: @Override public void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.blah); WebView webview = (WebView)findViewById(R.id.webview); if (savedInstanceState … Read more