progress

Android seekbar set custom style using nine-patch images

佐手、 提交于 2019-11-27 18:09:36
问题 I am trying to create a custom-styled seekbar. I have two nine-patch images one is a gray stretching bar search_progress.9.png (background color) and the other is a green stretching bar search_progress_bar.9.png (foreground color). I use this xml as my seekbar's progressDrawable: <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@android:id/background" android:drawable="@drawable/search_progress"></item> <item

Using BASH to display a progress (working) indicator [duplicate]

孤人 提交于 2019-11-27 16:51:43
This question already has an answer here: How to add a progress bar to a shell script? 36 answers Using a bash only script, how can you provide a bash progress indicator? So I can run a command form bash, and while that command is executing let the user know that something is still happening. Pez Cuckow 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

Showing progress in percentage while uploading and downloading using HttpWebRequest class

你。 提交于 2019-11-27 15:19:52
问题 I'm trying to upload and download (in the same request) to a server using HttpWebRequest in C# and since the size of data is considerable (considering network speed) I would like to show the user how far of the job is done and how much is left (not in seconds but in percentage). I've read a couple of examples trying to implement this but none of them show any progress bar. They all just use async not to block the UI while it is uploading/downloading. And they are mostly focused on upload /

HttpClient Post with progress and MultipartEntityBuilder

懵懂的女人 提交于 2019-11-27 14:31:14
I try to implement an progress while uploading an file with HttpClient 4.3.3 and MultipartEntityBuilder So actually i execute a post request with the following code HttpClientBuilder builder = HttpClientBuilder.create(); HttpClient httpClient = builder.build(); HttpPost httpPost = new HttpPost(uploadUrl); MultipartEntityBuilder entityBuilder = MultipartEntityBuilder.create(); entityBuilder.addPart("filea", new FileBody(filea)); entityBuilder.addPart("fileb", new FileBody(fileb)); final HttpEntity entity = entityBuilder.build(); httpPost.setEntity(entity); HttpResponse response = httpClient

how to change ProgressBar color?

廉价感情. 提交于 2019-11-27 13:39:13
问题 i want to change Horizontal ProgressBar color i have tried this How to change the color of an indefinite ProgressBar? its not working still progress run in blue color this is my code <ProgressBar android:id="@+id/mini_progress" android:layout_marginLeft="10dip" android:layout_marginRight="10dip" style="?android:attr/progressBarStyleHorizontal" android:layout_width="match_parent" android:layout_height="20dip" android:layout_gravity="center_horizontal" android:indeterminate="false" android

Busy indication with PyQt progress bar

主宰稳场 提交于 2019-11-27 12:15:15
I'm trying to write a script which will display a busy indication while performing the task. And when the task is over, the progress bar will fill to the end showing that 100% task has been completed. I just want the progress bar to show a task is going on.But when I start the task, busy indication stops.It seems to me that the indication and the task can not continue together. Please help me. Here's mycode: from PyQt4 import QtCore, QtGui from time import sleep try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: def _fromUtf8(s): return s try: _encoding = QtGui.QApplication

java+web+大文件上传下载

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 12:08:29
文件上传是最古老的互联网操作之一,20多年来几乎没有怎么变化,还是操作麻烦、缺乏交互、用户体验差。 一、前端代码 英国程序员 Remy Sharp 总结了这些 新的接口 ,本文在他的基础之上,讨论在前端采用HTML5的API,对文件上传进行渐进式增强: * iframe上传    * ajax上传    * 进度条    * 文件预览    * 拖放上传 1.1 传统形式   文件上传的传统形式,是使用表单元素file,参考 http://www.ruanyifeng.com/blog/2012/08/file_upload.html : <form id="upload-form" action="upload.php" method="post" enctype="multipart/form-data" >     <input type="file" id="upload" name="upload" /> <br />     <input type="submit" value="Upload" /> </form> 所有浏览器都支持上面的代码,点击上传按钮后,网页"锁死",用户只能等待上传结束,然后浏览器刷新,跳到表单的action属性指定的网址。 1.2 iframe上传   用户点击submit时,动态插入一个iframe元素 var form = $("

JavaScript loading progress of an image

依然范特西╮ 提交于 2019-11-27 10:44:21
Is there a way in JS to get the progress of a loading image while the image is being loaded? I want to use the new Progress tag of HTML5 to show the progress of loading images. I wish there was something like: var someImage = new Image() someImage.onloadprogress = function(e) { progressBar.value = e.loaded / e.total }; someImage.src = "image.jpg"; With this, you add 2 new functions on the Image() object: Image.prototype.load = function(url){ var thisImg = this; var xmlHTTP = new XMLHttpRequest(); xmlHTTP.open('GET', url,true); xmlHTTP.responseType = 'arraybuffer'; xmlHTTP.onload = function(e)

Uploading HTTP progress tracking

三世轮回 提交于 2019-11-27 10:37:10
问题 I've got WPF application I'm writing that posts files to one of social networks. Upload itself working just fine, but I'd like to provide some indication of how far along I am with the uploading. I tried a bunch of ways to do this: 1) HttpWebRequest.GetStream method: using ( var FS = File.Open( localFilePath, FileMode.Open, FileAccess.Read, FileShare.Read)) { long len = FS.Length; HttpWebRequest request = (HttpWebRequest) WebRequest.Create(url); request.Method = "POST"; request

Show spinning wheel dialog while loading data on Android

北战南征 提交于 2019-11-27 10:18:23
问题 I want to show a spinning wheel dialog while my app loads some data: The spinning wheel dialog should show on a button click. I’m using the code below but it does now show the spinning wheel. What could be the problem? public void CheckAccount(String username, String password) { try { final ProgressDialog progDailog = ProgressDialog.show(this, "Progress_bar or give anything you want", "Give message like ....please wait....", true); new Thread() { public void run() { try { // sleep the thread,