Can onprogress functionality be added to jQuery.ajax() by using xhrFields?

Short answer: No, you can’t do what you want using xhrFields. Long answer: There are two progress events in a XmlHttpRequest object: The response progress (XmlHttpRequest.onprogress) This is when the browser is downloading the data from the server. The request progress (XmlHttpRequest.upload.onprogress) This is when the browser is sending the data to the server (including … Read more

Stop the browser “throbber of doom” while loading comet/server push iframe

After digging for a day and a night in the guts of the internets, here is what I came up with: server-sent events – Very cool, currently works only in Opera, but may be part of HTML5 and other browsers may support it sometime. Adds a new element tag with content-type of “application/x-dom-event-stream” which allows … Read more

Progress indicator for git clone

Not really. There are various stages to git clone: discover the objects that need to be sent (“Counting objects: nnn”) compress and send those objects index the received pack check out received files Stage 1 involves walking through the commit graph from each branch head finding all the commits and associated objects: since there is … Read more

Android Back Button and Progress Dialog

First, you should show your dialog from OnPreExecute, hide it in OnPostExecute, and – if necessary – modify it by publishing progress. (see here) Now to your question: ProgressDialog.show() can take a OnCancelListener as an argument. You should provide one that calls cancel() on the progress dialog instance. example: @Override protected void onPreExecute(){ _progressDialog = … Read more

Using Bash to display a progress indicator (spinner) [duplicate]

In this example using SCP, I’m demonstrating how to grab the process id (pid) and then do something while that process is running. This displays a simple spinnng icon. /usr/bin/scp me@website.com:file somewhere 2>/dev/null & pid=$! # Process Id of the previous running command spin[0]=”-” spin[1]=”\\” spin[2]=”|” spin[3]=”https://stackoverflow.com/” echo -n “[copying] ${spin[0]}” while [ kill -0 … Read more

Is there any way to show progress on a `gunzip < database.sql.gz | mysql ...` process?

You may use -v : Verbose mode (show progress) in your command, or there’s another method using Pipe Viewer (pv) which shows the progress of the gzip, gunzip command as follows: $ pv database1.sql.gz | gunzip | mysql -u root -p database1 This will output progress similar to scp: $ pv database1.sql.gz | gunzip | … Read more