Search Results

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

Page 14/381 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • Matching first set of elements with xpath...

    - by Ugo Enyioha
    I have an xml document that looks like this. <foo> <bar type="artist"/> Bob Marley </bar> <bar type="artist"/> Peter Tosh </bar> <bar type="artist"/> Marlon Wayans </bar> </foo> <foo> <bar type="artist"/> Bob Marley </bar> <bar type="artist"/> Peter Tosh </bar> <bar type="artist"/> Marlon Wayans </bar> </foo> <foo> <bar type="artist"/> Bob Marley </bar> <bar type="artist"/> Peter Tosh </bar> <bar type="artist"/> Marlon Wayans </bar> </foo> I would like to construct an xpath that returns only the first set: <bar type="artist"/> Bob Marley </a> <bar type="artist"/> Peter Tosh </a> <bar type="artist"/> Marlon Wayans </a> How would one go about this? I have tried //bar[@type='artist'] but it's obvious there's more to this. Thanks in advance.

    Read the article

  • OpenGL ES, UIView and Status Bar mess

    - by sfider
    I have iPhone (iPhoneOS 3.x) OpenGL ES app that: can be in landscape/portrait orientation can be with/without status bar shown I do this by changing status bar orientation and hidden state, then updating OpenGL view frame so it won't overlap status bar and setting projection matrix appropriately. OpenGL view is in portrait orientation at all time. View controller's shouldAutorotateToInterfaceOrientation: method returns false always, so the status bar won't start autorotating when app is in landscape mode. The problem I have is that I want to use some other UIViews, like: UIWebView, MFMailComposeView, MPMediaPicker. I could show them as modals, but this this have some drawbacks: views will always show in portrait orientation, even if they support landscape orientation views will not autorotate, even if they support it What I do is I take OpenGL view of the window with removeFromSuperview, set transform to the other view so it will be in portrait/landscape orientation when it shows up and place the other view on the window with addSubview:. This works fine without the status bar, but with it there are some problems I cannot work out: MPMediaPicker is sized to fit under status bar, but it slides under it anyway MFMailComposeView does not show navigation bar until it autorotates on device orientation change Does anyone has an idea how can I get it to work?

    Read the article

  • set width of bars in matlab bar plot on logarithmic scale

    - by KatyB
    I am a bit confused on how to draw a bar graph for the following example: x_lims = [1000,10000;10000,100000;100000,1000000;1000000,10000000;10000000,... 100000000;100000000,1000000000;1000000000,10000000000;... 10000000000,100000000000;100000000000,1e12]; ex1 = [277422033.049038;24118536.4203188;2096819.03295482;... 182293.402068030;15905;1330;105;16;1]; Here, x_lims is the x axis limits for each individual bar and ex1 is the count. How can I plot these on a bar graph so that the width of each individual bar along the x axis is defined by the distance between x_lims(:,1) and x_lims(:,2) and the y value is defined by ex1? So far I have: bar(log10(x_lims(:,1)),log10(ex1)); set(gca,'Xtick',3:11,'YTick',0:9); set(gca,'Xticklabel',10.^get(gca,'Xtick'),... 'Yticklabel',10.^get(gca,'Ytick')); But I would like to (1) have the labels to be the same as if they were created using semilogx or semilogy e.g. 10^9, and (2) I would like to remove the space between the bars, for the first bar, for example, I would like to have it extend horizontally from 1000 to 10000 and then the second bar from 10000 to 100000, and so on. How can this be done?

    Read the article

  • Possible to do rounded corners in custom Progressbar progressDrawable?

    - by b-ryce
    I have a progress bar that is supposed to look like the attached image: And I've made it a long way. I'm very close the only part that isn't working is the rounded corners for the progressDrawable. Here is what mine looks like. (Notice, circled in red, that the fill inside the white outline does not have rounded corners): So, I've found a couple of ways to make this work when the progress bar is colored in with a shape, gradient, or color. BUT, I can't get it with an image as the progressDrawable. Here is my class that extends ProgressBar public class RoundedProgressBar extends ProgressBar{ private Paint paint; public RoundedProgressBar(Context context) { super(context); setup(); } public RoundedProgressBar(Context context, AttributeSet attrs) { super(context, attrs); setup(); } public RoundedProgressBar(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); setup(); ; } protected void setup() { paint = new Paint(); } @Override protected synchronized void onDraw(Canvas canvas) { // First draw the regular progress bar, then custom draw our text super.onDraw(canvas); paint.setColor(Color.WHITE); paint.setStyle(Paint.Style.STROKE); RectF r = new RectF(0,0,getWidth()-1,getHeight()-1); canvas.drawRoundRect(r,getHeight()/2,getHeight()/2, paint); } } Here is my selector: <layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@android:id/background" android:drawable="@drawable/slider_track" /> <item android:id="@android:id/secondaryProgress" android:drawable="@drawable/slider_track" /> <item android:id="@android:id/progress" android:drawable="@drawable/slider_track_progress" /> </layer-list> Here are the images used in the selector: slider_track- slider_track_progress- Here is where I embed my progressbar in the layout for my activity <com.android.component.RoundedProgressBar android:id="@+id/player_hp_bar" android:layout_width="fill_parent" android:layout_height="36dip" android:layout_marginLeft="30dip" android:layout_marginRight="30dip" android:max="100" style="?android:attr/progressBarStyleHorizontal" android:progressDrawable="@drawable/slider_layer_list" android:progress="20" android:maxHeight="12dip" android:minHeight="12dip" /> Anyone know how to make this work?

    Read the article

  • Progress Bar not updating

    - by Bailz
    I have the following piece of code to write data to an XML file. private void WriteResidentData() { int count = 1; status = "Writing XML files"; foreach (Site site in sites) { try { //Create the XML file StreamWriter writer = new StreamWriter(path + "\\sites\\" + site.title + ".xml"); writer.WriteLine("<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>"); writer.WriteLine("<customer_list>"); foreach (Resident res in site.GetCustomers()) { bw.ReportProgress((count / customers) * 100); writer.WriteLine("\t<customer>"); writer.WriteLine("\t\t<customer_reference>" + res.reference + "</customer_reference>"); writer.WriteLine("\t\t<customer_name>" + res.name + "</customer_name>"); writer.WriteLine("\t\t<customer_address>" + res.address + "</customer_address>"); writer.WriteLine("\t\t<payment_method>" + res.method + "</payment_method>"); writer.WriteLine("\t\t<payment_cycle>" + res.cycle + "</payment_cycle>"); writer.WriteLine("\t\t<registered>" + CheckWebStatus(res.reference) + "</registered>"); writer.WriteLine("\t</customer>"); count++; } writer.WriteLine("</customer_list>"); writer.Close(); } catch (Exception ex) { lastException = ex; } } } It's using the same BackgroundWorker that gets the data from the database. My progress bar properly displays the progress whilst it is reading from the database. However, after zeroing the progress bar for the XML writing it simply sits at 0 even though the process is completing correctly. Can anyone suggest why?

    Read the article

  • Accurately display upload progress in Silverilght upload

    - by Matt
    I'm trying to debug a file upload / download issue I'm having. I've got a Silverlight file uploader, and to transmit the files I make use of the HttpWebRequest class. So I create a connection to my file upload handler on the server and begin transmitting. While a file uploads I keep track of total bytes written to the RequestStream so I can figure out a percentage. Now working at home I've got a rather slow connection, and I think Silverlight, or the browser, is lying to me. It seems that my upload progress logic is inaccurate. When I do multiple file uploads (24 images of 3-6mb big in my testing), the logic reports the files finish uploading but I believe that it only reflects the progress of written bytes to the RequestStream, not the actual amount of bytes uploaded. What is the most accurate way to measure upload progress. Here's the logic I'm using. public void Upload() { if( _TargetFile != null ) { Status = FileUploadStatus.Uploading; Abort = false; long diff = _TargetFile.Length - BytesUploaded; UriBuilder ub = new UriBuilder( App.siteUrl + "upload.ashx" ); bool complete = diff <= ChunkSize; ub.Query = string.Format( "{3}name={0}&StartByte={1}&Complete={2}", fileName, BytesUploaded, complete, string.IsNullOrEmpty( ub.Query ) ? "" : ub.Query.Remove( 0, 1 ) + "&" ); HttpWebRequest webrequest = ( HttpWebRequest ) WebRequest.Create( ub.Uri ); webrequest.Method = "POST"; webrequest.BeginGetRequestStream( WriteCallback, webrequest ); } } private void WriteCallback( IAsyncResult asynchronousResult ) { HttpWebRequest webrequest = ( HttpWebRequest ) asynchronousResult.AsyncState; // End the operation. Stream requestStream = webrequest.EndGetRequestStream( asynchronousResult ); byte[] buffer = new Byte[ 4096 ]; int bytesRead = 0; int tempTotal = 0; Stream fileStream = _TargetFile.OpenRead(); fileStream.Position = BytesUploaded; while( ( bytesRead = fileStream.Read( buffer, 0, buffer.Length ) ) != 0 && tempTotal + bytesRead < ChunkSize && !Abort ) { requestStream.Write( buffer, 0, bytesRead ); requestStream.Flush(); BytesUploaded += bytesRead; tempTotal += bytesRead; int percent = ( int ) ( ( BytesUploaded / ( double ) _TargetFile.Length ) * 100 ); UploadPercent = percent; if( UploadProgressChanged != null ) { UploadProgressChangedEventArgs args = new UploadProgressChangedEventArgs( percent, bytesRead, BytesUploaded, _TargetFile.Length, _TargetFile.Name ); SmartDispatcher.BeginInvoke( () => UploadProgressChanged( this, args ) ); } } //} // only close the stream if it came from the file, don't close resizestream so we don't have to resize it over again. fileStream.Close(); requestStream.Close(); webrequest.BeginGetResponse( ReadCallback, webrequest ); }

    Read the article

  • Hiding iPhone Status Bar pulls my tableViews up by 20px

    - by JustinXXVII
    When doing an asynchronous HTTP request, I hide the iPhone status bar and animate in my own custom UIViewController to show upload status. So instead of seeing signal strength, carrier, time and battery life, the user gets messages based on the progress of the HTTP request. My status bar is exactly 20px high, and fits nicely where the status bar used to be. When the HTTP activity is done, the custom view animates out and the iPhone status bar animates back in. I would like to just avoid hiding the iPhone status bar completely, and instead bring my custom view ON TOP of the status bar. Currently, if I invoke my custom view animation and keep the iPhone status bar set to visible, my custom view is behind it. This is the code I have: -(void) animateStatusBarIn { CGRect statusFrame = CGRectMake(0.0f, -20.0f, 320.0f, 20.0f); UploadStatusBar *statusView = [[UploadStatusBar alloc] initWithNibName:@"UploadStatusBar" bundle:nil]; self.status = statusView; [statusView release]; status.view.frame = statusFrame; [[UIApplication sharedApplication] setStatusBarHidden:YES animated:YES]; [window addSubview:status.view]; [UIView beginAnimations:@"slideDown" context:nil]; [UIView setAnimationDuration:0.3]; [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(animationFinished:)]; status.view.frame = CGRectMake(0.0f, 0.0f, 320.0f, 20.0f); [UIView commitAnimations]; } -(void) animateStatusBarOut { [UIView beginAnimations:@"slideUp" context:nil]; [UIView setAnimationDuration:0.3]; [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(animationFinished:)]; status.view.frame = CGRectMake(0.0f, -20.0f, 320.0f, 20.0f); [UIView commitAnimations]; } -(void)animationFinished:(NSString *)name { if ([name isEqualToString:@"slideDown"]) { } if ([name isEqualToString:@"slideUp"]) { [[UIApplication sharedApplication]setStatusBarHidden:NO animated:YES]; [status.view removeFromSuperview]; } } Without the [[UIApplication sharedApplication]setStatusBarHidden:YES animated:YES] you can't see my custom view. How can I get my custom view to just appear on top of the status bar so I don't have to hide it? Thank you!

    Read the article

  • PowerBuilder Indeterminate Progress Bar

    - by Adam Hawkes
    I have a somewhat-long-running stored procedure being called from a PB application. I want the UI to show an indicator that it is processing, but I don't know the exact progress. That is, I can't say whether it is 10% or 90% done. All I know is when it is done. To give the user something to look at I'd like to put a "Inderterminate" (horizontal) progress bar on the window somewhere. I've looked at the documentation for the built-in HProgressBar control and don't see how to force this behavior. Short of writing my own control or importing another one, is there a way to accomplish this?

    Read the article

  • Adobe Air upload progress without FileReference

    - by anhtuannd
    I'm deploying a small application with Adobe Air. My application will do batch upload from filepath which stored in a text file. For example, in a text file name "list.txt", there is a string "C:\myfiles\IMG_0001.JPG". Now I want to upload this image file, keep tracking of upload progress :-< I want to use FileReference to get the upload progress, but I don't know how to import from file's path. I also wonder how to use FileReference to upload this file without prompting a dialog for user to select file. Thank you so much :)

    Read the article

  • Progress Dialog in Android doesn't Show?

    - by Tyler
    Okay.. I am doing something similar to the below: private void onCreate() { final ProgressDialog dialog = ProgressDialog.show(this, "Please wait..", "Doing stuff..", true); Thread t = new Thread() { public void run() { //do some serious stuff... dialog.dismiss(); } }; t.start(); t.join(); stepTwo(); } However, what I am finding is that my progress dialog never even shows up. My App stalls for a moment so I know it is chugging along inside of thread t, but why doesnt my dialog appear? IF I remove the line: t.join(); Then what I find happens is that the progress dialog does show up, but my app starts stepTwo(); before what happens in the thread is complete.. Any ideas?

    Read the article

  • What's with "foo" and "bar" [closed]

    - by Matt S.
    Possible Duplicates: When foo and bar is not enough Code examples Foo Bar I've always wondered, why is there always "foo" and "bar" named as variables in most tutorials I've seen. Where did it come from? Why do we call them "foo" and "bar" why not something else?

    Read the article

  • C# progress bar not synced with download (WebClient class)

    - by dominiquel
    Hi, I am coding a system which has a small FTP module included inside, it's not the main feature at all, but needed... I must link the progressbar with the WebClient class event DownloadProgressChangedEventHandler and AsyncCompletedEventHandler, the progressbar increment is ok, and the ASyncCompletedEventHandler launch a MessageBox (as intended), the problem is that the progress bar see to load too slow... problem : My MessageBox pop at 100% (launched by the event handler), BUT when the MessageBox pop my progress bar is only at +-80% (but the .VALUE is really 100), the first though I had was that they have added a "smooth" effect in Windows Vista which slow down the progressbar relatively to it's true value. If any of you have experienced the same problem thanks for your help.

    Read the article

  • PHP upload with progress bar

    - by Mitchan Adams
    Hi all I want to create an upload form to upload large files. Thats pretty much easy, however, the upload process itself taks long and basically looks like nothing is happening for a few minutes. So now I'd like to insert a progress bar to show the user that something is happening and they should just sit tight. I've read of numerous methods like APC and certian flash plugins, but my site is hosted on a shared server and I cant install any new applications on it. I'm thinking, maybe if it is possible to read the size of the temp file it creates via an ajax page. By polling the size every few seconds I should be able to get the progress of the upload. Now the question I pose is...where is the temp file situated?

    Read the article

  • how to implement jquery php progress bar

    - by KittyYoung
    I have a multi-step form where the form on Step3 submits to Step4.php. Step4 is a results page, and it takes some time to load, so I wanted to try and implement a progress bar or a loading bar or something when the user clicks the step3 submit button before Step4.php actually loads. I would think I could do this with jquery? But, I'm not sure how. Is it possible to do this without having to use jquery to post the data to step4.php?

    Read the article

  • asp.net ajax progress counter

    - by xt_20
    Hi all, I have a small C# ASP.NET app, and want to include an Ajax progress counter. The architecture is currently like this: Web Application -- calls a class that does the upload For example, in default.aspx, I call : FileHelper fh = new FileHelper() fh.MoveFiles(file) I have an Ajax control that fires when the above is called. This is a control that resides on the website class/project. How do I update the progress counter from the Filehelper class? (I don't think calling the control directly would work as it would be a circular reference) Also how do I continuously update the counter? Thanks all

    Read the article

  • Tab-Bar not hiding on all views

    - by Sheehan Alam
    I have a tab-bar controller that loads a RootView. The RootView has 4 buttons that will load a UITableView I don't want my tab-bar to be visible in the RootView so I added the following code: -(void)viewDidLoad{ self.hidesBottomBarWhenPushed = YES; } When I initially load the app the tab-bar doesn't appear, but when I click on a button, and go back to the RootView the tab-bar still appears. I have tried placing this code in viewWillAppear and other application lifecycle methods but no luck.

    Read the article

  • what is the best and easiest to draw a multi bar chart in php

    - by gin
    i want to display the results of students scores in a multi-vertical bar chart (red bar for correct , green bar for false) for each question,, i already tried Google chart, but it gives me result in this way:link text note: the bars that reached the top , should not be at top ,, only because they have the highest value (75%), Google chart makes it at top which i don't want.. any suggestions about how to draw simple vertical bar chart with php

    Read the article

  • Android Progress Dialog not showing

    - by ilomambo
    This is the handler, in the main Thread, which shows and dismisses a progress dialog. public static final int SHOW = 0; public static final int DISMISS = 1; public Handler pdHandler = new Handler() { @Override public void handleMessage(Message msg) { Log.i(TAG, "+ handleMessage(msg:" + msg + ")"); switch(msg.what) { case SHOW: pd = ProgressDialog.show(LogViewer.this, "", getText(R.string.loading_msg), true); break; case DISMISS: if(pd != null) { pd.dismiss(); pd = null; } break; } } }; The message to show the progress is: pdHandler.sendMessage(pdHandler.obtainMessage(SHOW)); The message to dismiss it is: pdHandler.sendMessage(pdHandler.obtainMessage(DISMISS)); It works well when I call it before I start an AsyncTask, the AsyncTask onPostExecute() dismisses it. But when it runs within a runnable (runOnUiThread), the dialog does not show. Examining the pd variable on the debugger, it shows that is is created, it is running and it is visible, but in practice it is not visible. Any suggestion? UPDATE: I did the obvious test I should have done in the first place. I commented the DISMISS message. And the progress dialog did show up. It appeared too late, after the runnable was finished. I undestand now that the DISMISS message did dismiss the not-yet-visible ProgressDialog, that's why I did not see it. The question becomes now: I need the ProgressDialog to show BEFORE the runnable code is executed. And it is not so straight forward. My call hierarchy is like this: onScrollEventChanged --> runOnUiThread ( --> checkScrollLimits --> if need to scroll show ProgressDialog "Loading" get new data into table dismiss ProgressDIalog ) I tried something like this: onScrollEventChanged --> checkScrollLimits --> if need to scroll show ProgressDialog "Loading" --> runOnUiThread ( get new data into table dismiss ProgressDIalog ) But still the dismiss message got there before the ProgressDialog could show. According to Logcat there is a five second interval between the arrival of the SHOW message and the arrival of the DISMISS message. UPDATE II: I though I will use the isShowing() method of ProgressDIalog pd = ProgressDialog.show(...) while(!pd.isShowing()); But it does not help at all, it returns true even if the dialog is not showing yet.

    Read the article

  • Communicate progress from local Service

    - by kpdvx
    An application I'm building uses a local Service for downloading files from the web to the phone's SD card. In this app users can browse lists of books, and read them while online. A user can also download a pdf copy of a book for offline viewing. To handle downloads I'm using a locally bound Service. I do not want this Service to run all the time, only when downloading files. So that the Service can shut itself down when its tasks are complete, I am not binding to the service, rather I'm sending an "enqueue for download" command through the Intent passed to Context.startService. Books available for download are shown in a list. A user can choose to download a book by clicking on its row in the list. On download, I need to show download progress using a ProgressBar on the actual book list row. I need to also show, on the rows, if a book is enqueued for download, or if its download has completed or failed. The books can be shown in different activities throughout the application--in search, or in the user's list of favorite books, for example. When the books are shown in different places, these are not the same objects, but they are uniquely identified by their bookId. Because I do not want to bind to the service from every Activity, my tentative plan was to use a public static final HashMap on the Service class itself to contain a mapping of bookId to download status, an enum of enqueued, downloading, cancelled, etc. Each book view, when displayed, would check this static HashMap, and if the bookId is in the map, retrieve and display its status. I don't particularly like this idea, but at the moment it's the only way I can think of to retrieve status from the Service without having to bind to it and start it. Additionally I need to retrieve download progress percent from the Service, for a given bookId, if it is the active download. Again I'd rather not bind to the service from every activity, so I'm not sure how to go about retrieving current progress from the Service. My current plan is to use some sort of singleton mediator, that the Service will push updates to, and the views can read from. But I'm not terribly happy with this idea. The reason I'd like to avoid binding to the Service from each Activity is 1.) I'm already running another Service and 2.) binding is verbose and I'd like to avoid needing to pass around a reference to the Service (but admittedly this isn't too much of a problem). Perhaps binding to the local Service isn't expensive enough to warrant this other setup? Should I not be concerned about binding to it from each Activity? Maybe this is a non-issue?

    Read the article

  • Make staus bar visible without overlapping view

    - by aeolai
    Hello, I have a tab bar with two views. In the first view the iPhone status bar is hidden using [[UIApplication sharedApplication] setStatusBarHidden:YES animated:YES]. When the second view is loaded, and the status bar is made visible again using [[UIApplication sharedApplication] setStatusBarHidden:NO animated:YES] it overlaps the view. How do I make the status bar visible again without overlapping the second view? Thanks

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >