Search Results

Search found 9520 results on 381 pages for 'progress bar'.

Page 2/381 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • File upload progress

    - by Cornelius
    I've been trying to track the progress of a file upload but keep on ending up at dead ends (uploading from a C# application not a webpage). I tried using the WebClient as such: class Program { static volatile bool busy = true; static void Main(string[] args) { WebClient client = new WebClient(); // Add some custom header information client.Credentials = new NetworkCredential("username", "password"); client.UploadProgressChanged += client_UploadProgressChanged; client.UploadFileCompleted += client_UploadFileCompleted; client.UploadFileAsync(new Uri("http://uploaduri/"), "filename"); while (busy) { Thread.Sleep(100); } Console.WriteLine("Done: press enter to exit"); Console.ReadLine(); } static void client_UploadFileCompleted(object sender, UploadFileCompletedEventArgs e) { busy = false; } static void client_UploadProgressChanged(object sender, UploadProgressChangedEventArgs e) { Console.WriteLine("Completed {0} of {1} bytes", e.BytesSent, e.TotalBytesToSend); } } The file does upload and progress is printed out but the progress is much faster than the actual upload and when uploading a large file the progress will reach the maximum within a few seconds but the actual upload takes a few minutes (it is not just waiting on a response, all the data have not yet arrived at the server). So I tried using HttpWebRequest to stream the data instead (I know this is not the exact equivalent of a file upload as it does not produce multipart/form-data content but it does serve to illustrate my problem). I set AllowWriteStreamBuffering to false and set the ContentLength as suggested by this question/answer: class Program { static void Main(string[] args) { FileInfo fileInfo = new FileInfo(args[0]); HttpWebRequest client = (HttpWebRequest)WebRequest.Create(new Uri("http://uploadUri/")); // Add some custom header info client.Credentials = new NetworkCredential("username", "password"); client.AllowWriteStreamBuffering = false; client.ContentLength = fileInfo.Length; client.Method = "POST"; long fileSize = fileInfo.Length; using (FileStream stream = fileInfo.OpenRead()) { using (Stream uploadStream = client.GetRequestStream()) { long totalWritten = 0; byte[] buffer = new byte[3000]; int bytesRead = 0; while ((bytesRead = stream.Read(buffer, 0, buffer.Length)) > 0) { uploadStream.Write(buffer, 0, bytesRead); uploadStream.Flush(); Console.WriteLine("{0} of {1} written", totalWritten += bytesRead, fileSize); } } } Console.WriteLine("Done: press enter to exit"); Console.ReadLine(); } } The request does not start until the entire file have been written to the stream and already shows full progress at the time it starts (I'm using fiddler to verify this). I also tried setting SendChunked to true (with and without setting the ContentLength as well). It seems like the data still gets cached before being sent over the network. Is there something wrong with one of these approaches or is there perhaps another way I can track the progress of file uploads from a windows application?

    Read the article

  • Flex 3 multiple upload progress monitoring

    - by Darko Z
    I have a Flex3 application which has to be capable of uploading multiple files and monitoring each files individual progress using a label NOT a progress bar. My problem is that a generic progress handler for the uploads has no way (that I know of) of indicating WHICH upload it is that is progressing. I know that a file name is available to check but in the case of this app the file name might be the same for multiple uploads. My question: With a generic progress handler how does one differentiate between 2 multiple uploads with the same file name? EDIT: answerers may assume that I am a total newb to Flex... because I am.

    Read the article

  • iPhone app with tab bar and navigation bar as peers

    - by Mac
    I'm trying to write an application that uses a navigation bar and tab bar in what (I'm gathering) is an unusual manner. Basically, I've got several "pages" ("home", "settings", etc) that each have their own tab. I'd also like to have it so that the "home" page is the root view of the navigation bar, and the other pages are the second-level views of the navigation bar. That is, I should be able to navigate to any page by clicking the appropriate tab bar item, and should be able to navigate to the home page from any other page by clicking the navigation bar's back button. Currently, I have a UINavigationBar (through a UINavigationController) and a UITabBar (through a UITabController) as children of a UIView. The various pages' view controllers are set as the tab controller's viewControllers property, and the home page's controller is also set as the navigation controller's root view. Each page view's tag is set to its index in the tab control. I have the following logic in the tab controller's didSelectViewController delegate method: - (void) tabBarController:(UITabBarController*) tabBarController didSelectViewController:(UIViewController*) viewController { if ([navController.viewControllers count] > 1) [navController popViewControllerAnimated:NO]; [navController pushViewController:viewController animated:YES]; } Also, in the navigation controller's didShowViewController delegate method, I have the following code: - (void) navigationController:(UINavigationController *) navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated { tabController.selectedIndex = viewController.view.tag; } The problem that's occurring is that when I run this, the navigation bar, tab bar and home page all display ok, but the tab bar will not respond to input - I cannot select a different tab. I gather it's more usual to have the tab bar as the child of the navigation control, or vice versa. This doesn't seem to fit my approach, because I don't want to have to individually create the subordinate control each time a change occurs in the parent control - eg: recreate tab bar each time the navigation bar changes. Does anyone have suggestions as to what's wrong and how to fix it? I'm probably missing something obvious, but whatever it is I can't seem to find it. Thanks! EDIT: I'm guessing it has something to do with both controller's trying to have ownership of the page controller, but I can't for the life of me figure out a way around it.

    Read the article

  • using .NET web service (Dataset) from progress OpenEdge 4GL

    - by jasperdmx
    I created web service in C# .net with input parameter : DataSet in other side, i need to use this web service from progress OpenEdge 4GL 10.1 (not 10.2) the problem is Dataset in OpenEdge cant match with DataSet in .net. always return 0 in the result I'm C# programmer, so dont have deep knowledge in porgress. I did research in progress forum, but not a good result. any help ? thanks in advance. *codes***** //web service : C# .net [webmethod] public int getResult(DataSet ds) { DataTable tbl = ds.Tables["datas"]; int result=0; foreach (DataRow dr in tbl.Rows){ //only 1 record = 1 row result = Convert.toInt32(dr["field1"]); } return result; } //progress OpenEdge 10.1 --- create and fill temp-table : field1 = 30 and only 1 record --- create dataset and bind to temp-table --- connect to web service --- call webmethod : define variable result as integer no-undo. RUN getResult IN hPortType(INPUT dataset,OUTPUT result). message result view-as alert-box info button ok. --- RESULT ALWAYS 0 /****/ anyone know how to "bridge" dataset in progress openedge to .net dataset ? note: this web service works well if called from .net

    Read the article

  • Getting progress reports from a layered worker class?

    - by Slashdev
    I have a layered worker class that I'm trying to get progress reports from. What I have looks something like this: public class Form1 { private void Start_Click() { Controller controller = new Controller(); controller.RunProcess(); } } public class Controller { public void RunProcess() { Thread newThread = new Thread(new ThreadStart(DoEverything)); newThread.Start(); } private void DoEverything() { // Commencing operation... Class1 class1 = new Class1(); class1.DoStuff(); Class2 class2 = new Class2(); class2.DoMoreStuff(); } } public class Class1 { public void DoStuff() { // Doing stuff Thread.Sleep(1000); // Want to report progress here } } public class Class2 { public void DoMoreStuff() { // Doing more stuff Thread.Sleep(2000); // Want to report progress here as well } } I've used the BackgroundWorker class before, but I think I need something a bit more free form for something like this. I think I could use a delegate/event solution, but I'm not sure how to apply it here. Let's say I've got a few labels or something on Form1 that I want to be able to update with class1 and class2's progress, what's the best way to do that?

    Read the article

  • How to create Server-side Progress indicator in Javascript

    - by Eli
    Hey Guys, I want to create a section in my site, where a user has a few simple update buttons. Each of these update buttons will be going to the server, and will do a long crunching behind the scene. While the server crunches data, I want the user to have a some kind of progress indicator, like progress bar or textual percentage. I'm using jQuery as my javascript library, and CodeIgniter (PHP) as the server-side framework, if it's important... What I was thinking about is using PHP's flush() function to report progress status to jQuery, but I'm not sure that jQuery's ajax functions are reading the output before it's complete... So any advice/explanation would be useful and helpful! Thanks :)

    Read the article

  • custom progress bar in net compact framework

    - by amolitrivedi
    Hi all, I want to have my own progress bar in .net compact framework, instead of default wait cursor. I have tried with a form, having only a progress bar, and showing and hiding the form when I want to show some background activity running, but that does not update the progress bar. I have found out that it needs to be on different thread. I am quite weak at threads, I cant get it working. Please help me out. Thanks in advance.

    Read the article

  • iPhone Circular Progress Indicator

    - by Ward
    I'm trying to create a circular progress indicator like Shazam. It will represent progress during recording. There will be a finite amount of time and I want it to react to the sound level like Shazam's does. Any clues where to begin? Thanks

    Read the article

  • Vertical Seek not progress value not showing on MainActivity textView

    - by Raju Gujarati
    I am try to display the progress value of the seekBar but when it comes to the execution, there is no update on the value being display on the TextView. I wonder what alternatives than putting two classes onto one big class in order to archive this aim ? The below is my code VerticalSeekBar.java package com.example.imagerotation; import android.content.Context; import android.graphics.Canvas; import android.util.AttributeSet; import android.view.MotionEvent; import android.widget.SeekBar; import android.widget.Toast; public class VerticalSeekBar extends SeekBar { public VerticalSeekBar(Context context) { super(context); } public VerticalSeekBar(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } public VerticalSeekBar(Context context, AttributeSet attrs) { super(context, attrs); } protected void onSizeChanged(int w, int h, int oldw, int oldh) { super.onSizeChanged(h, w, oldh, oldw); } @Override protected synchronized void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(heightMeasureSpec, widthMeasureSpec); setMeasuredDimension(getMeasuredHeight(), getMeasuredWidth()); } protected void onDraw(Canvas c) { c.rotate(-90); c.translate(-getHeight(), 0); super.onDraw(c); } @Override public boolean onTouchEvent(MotionEvent event) { if (!isEnabled()) { return false; } switch (event.getAction()) { case MotionEvent.ACTION_DOWN: case MotionEvent.ACTION_MOVE: case MotionEvent.ACTION_UP: int progress = getMax() - (int) (getMax() * event.getY() / getHeight()); setProgress(progress); onSizeChanged(getWidth(), getHeight(), 0, 0); //Toast.makeText(getContext(), String.valueOf(progress), Toast.LENGTH_SHORT).show(); break; case MotionEvent.ACTION_CANCEL: break; } return true; } } MainActvity.java package com.example.imagerotation; import android.app.Activity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.widget.TextView; public class MainActivity extends Activity { private VerticalSeekBar seek; private TextView by; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); seek = (VerticalSeekBar)findViewById(R.id.seekBar1); by = (TextView)findViewById(R.id.textView1); by.setText(String.valueOf(seek.getProgress())); } }

    Read the article

  • Decrease the height of title bar in Visual Studio 2012 on secondary screen

    - by matcheek
    I have two screens on my VS2012. No problems with title bar on the main screen, on the secondary however, the title bar takes up lots of space - see screenshot attached. In VS2010, for example, the title bar on secondary screen is a lot thinier. I guess this change was made to address touch interfaces (??) but it is highly inconvenient to waste some much space just because of that. Anybody knows how the change just the height of the title bar on the secondary screen?

    Read the article

  • Want to show file association icon and skype like progress bar c#

    - by Thomas
    whenever user drag any file onto skype chat textbox then skype show right icon for that file and one custom progress bar rounded corner. i have 4 questions 1) i am working with win application not WPF. i like to know how to develop skype like corner progressbar. i search lot google to find out skype like progressbar. so if anyone knows how to develop that kind of progress bar then please share that knowledge or give me any url from where i can download similar look progressbar. 2) when i drag any file onto my richtextbox then how could i show right icon for that file on my richtextbox. anyone can give me idea. 3) what kind of richtextbox skype use? is there any advance richtextbox library which i can use for showing picture or button etc. 4) skype shows button on chat textbox called Cancel......is it button or any image. when user click on that button then button respond accordingly. so just tell me how could place any button on my rich textbox and when i will click on that button then a event should fire at my end. any idea. here i attach a picture from where you can see the image of progressbar that i am looking for. how i want to show the progress button and file associated icon on richtextbox. the object behind attaching the image is other person can understand what is my requirement and what i want to know. please anyone give me the idea for my above 4 points. thanks

    Read the article

  • IE10 - Progress bar animation issue

    - by user3723885
    I'm trying to incorporate some animated progress bars but I'm having trouble getting them to animate in IE10. I believe the problem is due to the keyframes being inside the media query but have not been able to get it working. Thanks for your help. HTML: <td><div style="width:150px;height:15px;border:1px solid black"> <div class="meter"> <span style="width:85%;"><span class="progress"></span></span> </div> </div></td></tr> CSS: .progress { background-color: #325C74; -webkit-animation: progressBar 3s ease-in-out; -webkit-animation-fill-mode:both; -moz-animation: progressBar 3s ease-in-out; -moz-animation-fill-mode:both; } @-webkit-keyframes progressBar { 0% { width: 0; } 100% { width: 100%; } } @-moz-keyframes progressBar { 0% { width: 0; } 100% { width: 100%; } }

    Read the article

  • Algorithm for tracking progress of controller method running in background

    - by SilentAssassin
    I am using Codeigniter framework for PHP on Windows platform. My problem is I am trying to track progress of a controller method running in background. The controller extracts data from the database(MySQL) then does some processing and then stores the results again in the database. The complete aforesaid process can be considered as a single task. A new task can be assigned while another task is running. The newly assigned task will be added in a queue. So if I can track progress of the controller, I can show status for each of these tasks. Like I can show "Pending" status for tasks in the queue, "In Progress" for tasks running and "Done" for tasks that are completed. Main Issue: Now first thing I need to find is an algorithm to track the progress of how much amount of execution the controller method has completed and that means tracking how much amount of method has completed execution. For instance, this PHP script tracks progress of array being counted. Here the current state and state after total execution are known so it is possible to track its progress. But I am not able to devise anything analogous to it in my case. Maybe what I am trying to achieve is programmtically not possible. If its not possible then suggest me a workaround or a completely new approach. If some details are pending you can mention them. Sorry for my ignorance this is my first post here. I welcome you to point out my mistakes. EDIT: Database outline: The URL(s) and keyword(s) are first entered by user which are stored in a database table called link_master and keyword_master respectively. Then keywords are extracted from all the links present in this table and compared with keywords entered by user and their frequency is calculated which is the final result. And the results are stored in another table called link_result. Now sub-links are extracted from the domain links and stored in a table called sub_link_master. Now again the keywords are extracted from these sub-links and the corresponding results are stored in a table called sub_link_result. The number of records cannot be defined beforehand as the number of links on any web page can be different. Only the cardinality of *link_result* table can be known which will be equal to multiplication of number of keyword(s) and URL(s) . I insert multiple records at a time using this resource. Controller outline: The controller extracts keywords from a web page and also extracts keywords from all the links present on that page. There is a method called crawlLink. I used Rolling Curl to extract keywords and web page content. It has callback function which I used for extracting keywords alongwith generating results and extracting valid sub-links. There is a insertResult method which stores results for links and sub-links in the respective tables. Yes, the processing depends on the number of records. The more the number of records, the more time it takes to execute: Consider this scenario: Number of Domain Links = 1 Number of Keywords = 3 Number of Domain Links Result generated = 3 (3 x 1 as described in the question) Number of Sub Links generated = 41 Number of Sub Links Result = 117 (41 x 3 = 123 but some links are not valid or searchable) Approximate time taken for above process to complete = 55 seconds. The above result is for a single link. I want to track the progress of the above results getting stored in database. When all results are stored, the task is complete. If results are getting stored, the task is In Progress. I am not clear how can I track this progress.

    Read the article

  • eclipse progress bar

    - by Dave
    Hi! I develop an eclipse plugin and I want to create an progress bar as eclipse view at bottom of the workbench window. I have an example, but this is showed only a moment. Please give me some ideas, thanks ProgressMonitorDialog dialog = new ProgressMonitorDialog(shell); dialog.run(true, true, new IRunnableWithProgress(){ public void run(IProgressMonitor monitor) { monitor.beginTask("Some nice progress message here ...", 100); // execute the task ... monitor.done(); } });

    Read the article

  • Showing a progress bar when downloading a file from the server

    - by Purushotham
    Hi, I need to show a progress bar to the user who requests a file to download. I am using J2EE application to generate the file. User will submit the data from the client side to get the file. The server takes all the submitted data, generates file and sends it back to the requested user. So I want to show a progress bar to the user till the file comes to the him. Is there any way to do this ? I am using java, jquery and javascript in my application.

    Read the article

  • Ajax progress with PHP session

    - by FFish
    I have an app that processes images and use jQuery to display progress to the user. I done this with writing to a textfile each time and image is processed and than read this status with a setInterval. Because no images are actually written in the processing (I do it in PHP's memory) I thought a log.txt would be a solution, but I am not sure about all the fopen and fread's. Is this prone to issues? I tried also with PHP sessions, but can't seem to get it to work, I don't get why.. HTML: <a class="download" href="#">request download</a> <p class="message"></p> JS: $('a.download').click(function() { var queryData = {images : ["001.jpg", "002.jpg", "003.jpg"]}; $("p.message").html("initializing..."); var progressCheck = function() { $.get("dynamic-session-progress.php", function(data) { $("p.message").html(data); } ); }; $.post('dynamic-session-process.php', queryData, function(intvalId) { return function(data) { $("p.message").html(data); clearInterval(intvalId); } } (setInterval(progressCheck, 1000)) ); return false; }); process.php: // session_start(); $arr = $_POST['images']; $arr_cnt = count($arr); $filename = "log.txt"; for ($i = 1; $i <= $arr_cnt; $i++) { $content = "processing $val ($i/$arr_cnt)"; $handle = fopen($filename, 'w'); fwrite($handle, $content); fclose($handle); // $_SESSION['counter'] = $content; sleep(3); // to mimic image processing } echo "<a href='#'>download zip</a>"; progress.php: // session_start(); $filename = "log.txt"; $handle = fopen($filename, "r"); $contents = fread($handle, filesize($filename)); fclose($handle); echo $contents; // echo $_SESSION['counter'];

    Read the article

  • Python: Run a progess bar and work simultaneously?

    - by DanielTA
    I want to know how to run a progress bar and some other work simultaneously, then when the work is done, stop the progress bar in Python (2.7.x) import sys, time def progress_bar(): while True: for c in ['-','\\','|','/']: sys.stdout.write('\r' + "Working " + c) sys.stdout.flush() time.sleep(0.2) def work(): *doing hard work* How would I be able to do something like: progress_bar() #run in background? work() *stop progress bar* print "\nThe work is done!"

    Read the article

  • How to figure out "progress" while sorting?

    - by Mehrdad
    I'm using stable_sort to sort a large vector. The sorting takes on the order of a few seconds (say, 5-10 seconds), and I would like to display a progress bar to the user showing how much of the sorting is done so far. But (even if I was to write my own sorting routine) how can I tell how much progress I have made, and how much more there is left to go? I don't need it to be exact, but I need it to be "reasonable" (i.e. reasonably linear, not faked, and certainly not backtracking).

    Read the article

  • Progress 4GL and DB to Oracle and cloud

    - by llaszews
    Getting from client/server based 4GLs and databases where the 4GL is tightly linked to the database to Oracle and the cloud is not easy. The least risky and expensive option (in the short term) is to use the Progress OpenEdge DataServer for Oracle: Progress OpenEdge DataServer This eliminates the need to have to migrate the Progress 4GL to Java/J2EE. The database can be migrated using SQLWays Ispirer: Ispirer SQLWays ProgressDB migrations tool The Progress 4GL can remain as is. In order to get the application on the cloud there are a few approaches: 1. VDI - Virtual Desktop is a way to put all of the users desktop in a centralized environment off the desktop. This is great in cases where it is just not one client/server application that the user needs access too. In many cases, users will utilize MS Access, MS Excel, Crystal Reports and other tools to get at the Progress DB and other centralized databases. Vmware's acquistion of Wanova shows how VDI is growing in usage. Citrix is the 800 pound gorilla in the VDI space with Citrix WinFrame (now called XenDesktop). Oracle offers a VDI solution that Oracle picked up when it acquired Sun. 2. Hypervisor Server Virtualization - Of course you can place applications written in client/server languages like Progress 4GL buy using server virtualization from Oracle, VMWare, Microsoft, Citrix and others. 3. Microsoft Remote Desktop Services (aka: Terminal Services Client) The entire idea is to eliminate all the client/server desktop devices and connections which require desktop software and database drivers. A solution to removing database drivers from the desktop is to use DataDirect SQLLink

    Read the article

  • Integrating a Progress Bar into a Wizard

    - by Geertjan
    Normally, when you create a wizard, as described here, and you have your own iterator, you'll have a class signature like this: public final class MyWizardWizardIterator implements WizardDescriptor.InstantiatingIterator<WizardDescriptor> { Let's now imagine that you've got some kind of long running process your wizard needs to perform. Maybe the wizard needs to connect to something, which could take some time. Start by adding a new dependency on the Progress API, which gives you the classes that access the NetBeans Platform's progress functionality. Now all we need to do is change the class signature very slightly: public final class MyWizardWizardIterator implements WizardDescriptor.ProgressInstantiatingIterator<WizardDescriptor> { Take a look at the part of the signature above that is highlighted. I.e., use WizardDescriptor.ProgressInstantiatingIterator instead of WizardDescriptor.InstantiatingIterator. Now you will need to implement a new instantiate method, one that receives a ProgressHandle. The other instantiate method, i.e., the one that already existed, should never be accessed anymore, and so you can add an assert to that effect: @Override public Set<?> instantiate() throws IOException {     throw new AssertionError("instantiate(ProgressHandle) " //NOI18N             + "should have been called"); //NOI18N } @Override public Set instantiate(ProgressHandle ph) throws IOException {     return Collections.emptySet(); } OK. Let's now add some code to make our progress bar work: @Override public Set instantiate(ProgressHandle ph) throws IOException {     ph.start();     ph.progress("Processing...");     try {         //Simulate some long process:         Thread.sleep(2500);     } catch (InterruptedException ex) {         Exceptions.printStackTrace(ex);     }     ph.finish();     return Collections.emptySet(); } And, maybe even more impressive, you can also do this: @Override public Set instantiate(ProgressHandle ph) throws IOException {     ph.start(1000);     ph.progress("Processing...");     try {         //Simulate some long process:         ph.progress("1/4 complete...", 250);         Thread.sleep(2500);         ph.progress("1/2 complete...", 500);         Thread.sleep(5000);         ph.progress("3/4 complete...", 750);         Thread.sleep(7500);         ph.progress("Complete...", 1000);         Thread.sleep(1000);     } catch (InterruptedException ex) {         Exceptions.printStackTrace(ex);     }     ph.finish();     return Collections.emptySet(); } The screenshots above show you what you should see when the Finish button is clicked in each case.

    Read the article

  • Upload progress meter needed - PHP

    - by Pawan Kumar
    Hello everyone I have implemented Amazon S3 on my website to upload video. But i want to include upload progress meter in my site to show the status of how much percent, file has been uploaded. If any one have such script please replay me.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >