progress

Measure progress in recursive search

China☆狼群 提交于 2019-12-11 08:34:57
问题 I have a recursive search, which searches for files with a specified name in a whole directory. This needs quite some time and I want to show a progressbar, which shows atleast some progress (I don't care if the progress is just measured by the number of files or directory or the actual size of them). Following (recursive code) performs the search: private void searchFolder(PortableDeviceFolder parent, ref List<PortableDeviceFolder> result, string filename) { foreach (var item in parent.Files

VB.NET DownloadFileAsync fires completion event but doesn't download

旧时模样 提交于 2019-12-11 08:12:42
问题 I'm trying to download a .zip file to make an auto-updater for my game. It needs to show progress. I followed an online tutorial and got this chunk of code for the actual downloader: Dim SaveDirectory As String = "C:\Program Files (x86)\MyGame\" Dim client As WebClient = New WebClient AddHandler client.DownloadProgressChanged, AddressOf client_ProgressChanged AddHandler client.DownloadFileCompleted, AddressOf client_DownloadCompleted client.DownloadFileAsync(New Uri("https://example.com/game

Android MediaController seekbar not refreshing

我怕爱的太早我们不能终老 提交于 2019-12-11 06:58:58
问题 I'm using a MediaController and MediaPlayer together, to create a simple audio player in Android, taken from an example I found here on this site. However, after much search I could not find the solution to my problem: the progress/seek bar doesn't refresh while the music is playing. It just updates itself when something on the MediaController is pressed (Play/Pause, forward, etc). Any easy fix for this that I'm not getting ? NOTE: My MediaController is declared in XML , and my

Progress dialog on button click in android

淺唱寂寞╮ 提交于 2019-12-11 06:09:20
问题 I am making an android app in which i have to use progress dialog in android.I want to load progress image when i clicked on login button.Actully i am parsing response and i want till the time the response gets parsed it should show progress dialog.Any help will be appreciated. Thanks. 回答1: Yes you can do that like code below and link. http://developer.android.com/reference/android/os/AsyncTask.html private class DownloadFilesTask extends AsyncTask<URL, Integer, Long> { protected Long

Rotating wheel in Swing

末鹿安然 提交于 2019-12-11 05:47:07
问题 I have searched here but did not get my answer (though I feel it should be here). I want to perform some activity(but I don't know how much time it will take to complete) and while this task is being run, I want to show a rotating wheel to the user with a message "Processing...please wait". Once the activity gets completed,rotating wheel should also disappear. How to implement this feature? 回答1: As I seem to recall, the GlassPane in Swing can be used to: Intercept user input. Display an image

php asynchronous call and getting response from the background job

本小妞迷上赌 提交于 2019-12-11 04:36:48
问题 I have done some google search on this topic and couldn't find the answer to my question. What I want to achieve is the following: the client make an asynchronous call to a function in the server the server runs that function in the background (because that function is time consuming), and the client is not hanging in the meantime the client constantly make a call to the server requesting the status of the background job Can you please give me some advices on resolving my issue? Thank you

Sending progress value to progress bar in python

廉价感情. 提交于 2019-12-11 02:27:32
问题 In my game I have two modules, island.py which loads the islands into my game and the second module is gui.py which handles the gui widgets before game starting. My problem is how to send the progress values from the island.py module to the progress bar created in gui.py module EDIT: also with an instance of the loading screen to access the progress bar in it and change its value. In the module island.py def __iter__(self): total = float(len(self.ground_map)) import game.gui for i in self.get

Make a transition between activitys

99封情书 提交于 2019-12-11 00:33:00
问题 I need to make a transition screen, ou just put a dialog, because the app give a black screen when is creating the database. I have google, and find some solutions for this. One of then, is just put a progress dialog when the database is been created. My problem, and newbie question is, where do i put the progress dialog. A -> BlackScreen -> B where A is the inicial menu, and B the other screen. I have tried to put the dialog on A and/or in B and dont work. So where can i put the code of the

How can we estimate the time needed for program to complete and reflect that to progress bar?

醉酒当歌 提交于 2019-12-10 23:38:09
问题 This is not programming language specific. I just need to understand how can I estimate the time needed for a process to complete ? Such as unzipping file for example or burning a CD ? What are the factors that enhance the accuracy of this calculatio ? Some examples in any programming language will help of course. 回答1: Record the actual times taken and relevant factors; estimate future times based the averages of past runs with in similar situations. In most cases it will never be all that

AFNetworking setImageWithURLRequest download progress

拥有回忆 提交于 2019-12-10 23:23:51
问题 I am using this code to set image to UIImageView. NSURLRequest *URLRequest = [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:imageToLoad]]; [imageView setImageWithURLRequest:URLRequest placeholderImage:nil success:^(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image) { [cell.image setImage:image]; [cell.activityIndicator stopAnimating]; } failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error) { // Nothing }]; But I want to track download progress